airflow.providers.dbt.cloud.sensors.dbt

Module Contents

Classes

DbtCloudJobRunSensor

Checks the status of a dbt Cloud job run.

DbtCloudJobRunAsyncSensor

This class is deprecated.

class airflow.providers.dbt.cloud.sensors.dbt.DbtCloudJobRunSensor(*, dbt_cloud_conn_id=DbtCloudHook.default_conn_name, run_id, account_id=None, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Checks the status of a dbt Cloud job run.

See also

For more information on how to use this sensor, take a look at the guide: Poll for status of a dbt Cloud Job run

Parameters
  • dbt_cloud_conn_id (str) – The connection identifier for connecting to dbt Cloud.

  • run_id (int) – The job run identifier.

  • account_id (int | None) – The dbt Cloud account identifier.

  • deferrable (bool) – Run sensor in the deferrable mode.

template_fields = ('dbt_cloud_conn_id', 'run_id', 'account_id')[source]
hook()[source]

Returns DBT Cloud hook.

poke(context)[source]

Override when deriving this class.

execute(context)[source]

Run the sensor.

Depending on whether deferrable is set, this would either defer to the triggerer or poll for states of the job run, until the job reaches a failure state or success state.

execute_complete(context, event)[source]

Execute when the trigger fires - returns immediately.

This relies on trigger to throw an exception, otherwise it assumes execution was successful.

get_openlineage_facets_on_complete(task_instance)[source]

Implement _on_complete because job_run needs to be triggered first in execute method.

class airflow.providers.dbt.cloud.sensors.dbt.DbtCloudJobRunAsyncSensor(**kwargs)[source]

Bases: DbtCloudJobRunSensor

This class is deprecated.

Please use airflow.providers.dbt.cloud.sensor.dbt.DbtCloudJobRunSensor with deferrable=True.

Was this entry helpful?