prefect_dbt.cloud.runs
Module containing tasks and flows for interacting with dbt Cloud job runs
Functions
get_dbt_cloud_run_info
dbt_cloud_credentials: Credentials for authenticating with dbt Cloud.run_id: The ID of the job to trigger.include_related: List of related fields to pull with the run. Valid values are “trigger”, “job”, “debug_logs”, and “run_steps”. If “debug_logs” is not provided in a request, then the included debug logs will be truncated to the last 1,000 lines of the debug log output file.
- The run data returned by the dbt Cloud administrative API.
list_dbt_cloud_run_artifacts
dbt_cloud_credentials: Credentials for authenticating with dbt Cloud.run_id: The ID of the run to list run artifacts for.step: The index of the step in the run to query for artifacts. The first step in the run has the index 1. If the step parameter is omitted, then this method will return the artifacts compiled for the last step in the run.
- A list of paths to artifact files that can be used to retrieve the generated artifacts.
get_dbt_cloud_run_artifact
dbt_cloud_credentials: Credentials for authenticating with dbt Cloud.run_id: The ID of the run to list run artifacts for.path: The relative path to the run artifact (e.g. manifest.json, catalog.json, run_results.json)step: The index of the step in the run to query for artifacts. The first step in the run has the index 1. If the step parameter is omitted, then this method will return the artifacts compiled for the last step in the run.
- The contents of the requested manifest. Returns a
Dictif the requested artifact is a JSON file and astrotherwise.
wait_for_dbt_cloud_job_run
run_id: The ID of the run to wait for.dbt_cloud_credentials: Credentials for authenticating with dbt Cloud.max_wait_seconds: Maximum number of seconds to wait for job to completepoll_frequency_seconds: Number of seconds to wait in between checks for run completion.
DbtCloudJobRunTimedOut: When the elapsed wait time exceedsmax_wait_seconds.
- An enum representing the final dbt Cloud job run status
- A dictionary containing information about the run after completion.