DataprocInstantiateWorkflowTemplateOperator

Google

Instantiate a WorkflowTemplate on Google Cloud Dataproc. The operator will wait until the WorkflowTemplate is finished executing.

View on GitHub

Last Updated: Feb. 25, 2023

Access Instructions

Install the Google provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

template_idRequiredThe id of the template. (templated)
project_idThe ID of the google cloud project in which the template runs
regionRequiredThe specified region where the dataproc cluster is created.
parametersa map of parameters for Dataproc Template in key-value format: map (key: string, value: string) Example: { “date_from”: “2019-08-01”, “date_to”: “2019-08-02”}. Values may not exceed 100 characters. Please refer to: https://cloud.google.com/dataproc/docs/concepts/workflows/workflow-parameters
request_idOptional. A unique id used to identify the request. If the server receives two SubmitJobRequest requests with the same id, then the second request will be ignored and the first Job created and stored in the backend is returned. It is recommended to always set this value to a UUID.
retryA retry object used to retry requests. If None is specified, requests will not be retried.
timeoutThe amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.
metadataAdditional metadata that is provided to the method.
gcp_conn_idThe connection ID to use connecting to Google Cloud.
impersonation_chainOptional 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).
deferrableRun operator in the deferrable mode.
polling_interval_secondsTime (seconds) to wait between calls to check the run status.

Documentation

Instantiate a WorkflowTemplate on Google Cloud Dataproc. The operator will wait until the WorkflowTemplate is finished executing.

Was this page helpful?