Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created November 6, 2022 23:37
Show Gist options
  • Save anna-geller/f1b45d57732e435cf99e08a447f09e9c to your computer and use it in GitHub Desktop.
Save anna-geller/f1b45d57732e435cf99e08a447f09e9c to your computer and use it in GitHub Desktop.
from prefect import flow
from prefect_dbt.cloud import DbtCloudCredentials
from prefect_dbt.cloud.jobs import trigger_dbt_cloud_job_run_and_wait_for_completion
@flow
def run_dbt_job_flow():
trigger_dbt_cloud_job_run_and_wait_for_completion(
dbt_cloud_credentials=DbtCloudCredentials.load("default"), job_id=154217
)
if __name__ == "__main__":
run_dbt_job_flow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment