This module contains Google Dataplex triggers.

Module Contents



DataplexDataQualityJobTrigger runs on the trigger worker and waits for the job to be SUCCEEDED state.

class, data_scan_id, project_id, region, gcp_conn_id='google_cloud_default', polling_interval_seconds=10, impersonation_chain=None, **kwargs)[source]

Bases: airflow.triggers.base.BaseTrigger

DataplexDataQualityJobTrigger runs on the trigger worker and waits for the job to be SUCCEEDED state.

  • job_id (str | None) – Optional. The ID of a Dataplex job.

  • data_scan_id (str) – Required. DataScan identifier.

  • project_id (str | None) – Google Cloud Project where the job is running.

  • region (str) – The ID of the Google Cloud region that the job belongs to.

  • gcp_conn_id (str) – Optional, the connection ID used to connect to Google Cloud Platform.

  • impersonation_chain (str | Sequence[str] | None) – 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).

  • polling_interval_seconds (int) – polling period in seconds to check for the status.


Return the information needed to reconstruct this Trigger.


Tuple of (class path, keyword arguments needed to re-instantiate).

async run()[source]

Run the trigger in an asynchronous context.

The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.

If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).

In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.

Was this entry helpful?