astronomer.providers.dbt.cloud.triggers.dbt

Module Contents

Classes

DbtCloudRunJobTrigger

DbtCloudRunJobTrigger is triggered with run id and account id, makes async Http call to dbt and get the status

class astronomer.providers.dbt.cloud.triggers.dbt.DbtCloudRunJobTrigger(conn_id, run_id, end_time, poll_interval, account_id)[source]

Bases: airflow.triggers.base.BaseTrigger

DbtCloudRunJobTrigger is triggered with run id and account id, makes async Http call to dbt and get the status for the submitted job with run id in polling interval of time.

Parameters:
  • conn_id (str) – The connection identifier for connecting to Dbt.

  • run_id (int) – The ID of a dbt Cloud job.

  • end_time (float) – Time in seconds to wait for a job run to reach a terminal status. Defaults to 7 days.

  • account_id (Optional[int]) – The ID of a dbt Cloud account.

  • poll_interval (float) – polling period in seconds to check for the status.

serialize()[source]

Serializes DbtCloudRunJobTrigger arguments and classpath.

async run()[source]

Make async connection to Dbt, polls for the pipeline run status

async is_still_running(hook)[source]

Async function to check whether the job is submitted via async API is in running state and returns True if it is still running else return False