airflow.providers.google.cloud.operators.datafusion
¶
This module contains Google DataFusion operators.
Module Contents¶
Classes¶
Restart a single Data Fusion instance. |
|
Deletes a single Date Fusion instance. |
|
Creates a new Data Fusion instance in the specified project and location. |
|
Updates a single Data Fusion instance. |
|
Gets details of a single Data Fusion instance. |
|
Creates a Cloud Data Fusion pipeline. |
|
Deletes a Cloud Data Fusion pipeline. |
|
Lists Cloud Data Fusion pipelines. |
|
Starts a Cloud Data Fusion pipeline. Works for both batch and stream pipelines. |
|
Stops a Cloud Data Fusion pipeline. Works for both batch and stream pipelines. |
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionRestartInstanceOperator(*, instance_name, location, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Restart a single Data Fusion instance. At the end of an operation instance is fully restarted.
See also
For more information on how to use this operator, take a look at the guide: Restart DataFusion Instance
- Parameters
instance_name (str) -- The name of the instance to restart.
location (str) -- The Cloud Data Fusion location in which to handle the request.
project_id (Optional[str]) -- The ID of the Google Cloud project that the instance belongs to.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionDeleteInstanceOperator(*, instance_name, location, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Deletes a single Date Fusion instance.
See also
For more information on how to use this operator, take a look at the guide: Delete DataFusion Instance
- Parameters
instance_name (str) -- The name of the instance to restart.
location (str) -- The Cloud Data Fusion location in which to handle the request.
project_id (Optional[str]) -- The ID of the Google Cloud project that the instance belongs to.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionCreateInstanceOperator(*, instance_name, instance, location, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Creates a new Data Fusion instance in the specified project and location.
See also
For more information on how to use this operator, take a look at the guide: Create DataFusion Instance
- Parameters
instance_name (str) -- The name of the instance to create.
instance (Dict[str, Any]) -- An instance of Instance. https://cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances#Instance
location (str) -- The Cloud Data Fusion location in which to handle the request.
project_id (Optional[str]) -- The ID of the Google Cloud project that the instance belongs to.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionUpdateInstanceOperator(*, instance_name, instance, update_mask, location, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Updates a single Data Fusion instance.
See also
For more information on how to use this operator, take a look at the guide: Update DataFusion Instance
- Parameters
instance_name (str) -- The name of the instance to create.
instance (Dict[str, Any]) -- An instance of Instance. https://cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances#Instance
update_mask (str) -- Field mask is used to specify the fields that the update will overwrite in an instance resource. The fields specified in the updateMask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask, all the supported fields (labels and options currently) will be overwritten. A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". https://developers.google.com/protocol-buffers/docs/reference/google.protobuf?_ga=2.205612571.-968688242.1573564810#google.protobuf.FieldMask
location (str) -- The Cloud Data Fusion location in which to handle the request.
project_id (Optional[str]) -- The ID of the Google Cloud project that the instance belongs to.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionGetInstanceOperator(*, instance_name, location, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Gets details of a single Data Fusion instance.
See also
For more information on how to use this operator, take a look at the guide: Get DataFusion Instance
- Parameters
instance_name (str) -- The name of the instance.
location (str) -- The Cloud Data Fusion location in which to handle the request.
project_id (Optional[str]) -- The ID of the Google Cloud project that the instance belongs to.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionCreatePipelineOperator(*, pipeline_name, pipeline, instance_name, location, namespace='default', project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Creates a Cloud Data Fusion pipeline.
See also
For more information on how to use this operator, take a look at the guide: Create a DataFusion pipeline
- Parameters
pipeline_name (str) -- Your pipeline name.
pipeline (Dict[str, Any]) -- The pipeline definition. For more information check: https://docs.cdap.io/cdap/current/en/developer-manual/pipelines/developing-pipelines.html#pipeline-configuration-file-format
instance_name (str) -- The name of the instance.
location (str) -- The Cloud Data Fusion location in which to handle the request.
namespace (str) -- If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionDeletePipelineOperator(*, pipeline_name, instance_name, location, version_id=None, namespace='default', project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Deletes a Cloud Data Fusion pipeline.
See also
For more information on how to use this operator, take a look at the guide: Delete a DataFusion pipeline
- Parameters
pipeline_name (str) -- Your pipeline name.
version_id (Optional[str]) -- Version of pipeline to delete
instance_name (str) -- The name of the instance.
location (str) -- The Cloud Data Fusion location in which to handle the request.
namespace (str) -- If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionListPipelinesOperator(*, instance_name, location, artifact_name=None, artifact_version=None, namespace='default', project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Lists Cloud Data Fusion pipelines.
See also
For more information on how to use this operator, take a look at the guide: List DataFusion pipelines
- Parameters
instance_name (str) -- The name of the instance.
location (str) -- The Cloud Data Fusion location in which to handle the request.
artifact_version (Optional[str]) -- Artifact version to filter instances
artifact_name (Optional[str]) -- Artifact name to filter instances
namespace (str) -- If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionStartPipelineOperator(*, pipeline_name, instance_name, location, runtime_args=None, success_states=None, namespace='default', pipeline_timeout=5 * 60, project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, asynchronous=False, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Starts a Cloud Data Fusion pipeline. Works for both batch and stream pipelines.
See also
For more information on how to use this operator, take a look at the guide: Start a DataFusion pipeline
- Parameters
pipeline_name (str) -- Your pipeline name.
instance_name (str) -- The name of the instance.
success_states (Optional[List[str]]) -- If provided the operator will wait for pipeline to be in one of the provided states.
pipeline_timeout (int) -- How long (in seconds) operator should wait for the pipeline to be in one of
success_states
. Works only ifsuccess_states
are provided.location (str) -- The Cloud Data Fusion location in which to handle the request.
runtime_args (Optional[Dict[str, Any]]) -- Optional runtime args to be passed to the pipeline
namespace (str) -- If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
asynchronous -- Flag to return after submitting the pipeline Id to the Data Fusion API. This is useful for submitting long running pipelines and waiting on them asynchronously using the CloudDataFusionPipelineStateSensor
- class airflow.providers.google.cloud.operators.datafusion.CloudDataFusionStopPipelineOperator(*, pipeline_name, instance_name, location, namespace='default', project_id=None, api_version='v1beta1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Stops a Cloud Data Fusion pipeline. Works for both batch and stream pipelines.
See also
For more information on how to use this operator, take a look at the guide: Stop a DataFusion pipeline
- Parameters
pipeline_name (str) -- Your pipeline name.
instance_name (str) -- The name of the instance.
location (str) -- The Cloud Data Fusion location in which to handle the request.
namespace (str) -- If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
api_version (str) -- The version of the api that will be requested for example 'v3'.
gcp_conn_id (str) -- The connection ID to use when fetching connection info.
delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).