airflow.providers.google.cloud.operators.datafusion
¶
This module contains Google DataFusion operators.
Module Contents¶
-
class
airflow.providers.google.cloud.operators.datafusion.
CloudDataFusionRestartInstanceOperator
(*, instance_name: str, location: str, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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 (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: str, location: str, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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 (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: str, instance: Dict[str, Any], location: str, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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 (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: str, instance: Dict[str, Any], update_mask: str, location: str, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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 (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: str, location: str, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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 (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: str, pipeline: Dict[str, Any], instance_name: str, location: str, namespace: str = 'default', project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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: str, instance_name: str, location: str, version_id: Optional[str] = None, namespace: str = 'default', project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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: str, location: str, artifact_name: Optional[str] = None, artifact_version: Optional[str] = None, namespace: str = 'default', project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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: str, instance_name: str, location: str, runtime_args: Optional[Dict[str, Any]] = None, success_states: Optional[List[str]] = None, namespace: str = 'default', pipeline_timeout: int = 10 * 60, project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (dict) -- 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 (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 (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 (bool) -- 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: str, instance_name: str, location: str, namespace: str = 'default', project_id: Optional[str] = None, api_version: str = 'v1beta1', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = 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 (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 (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).