brendan
04/05/2024, 9:53 AMtrigger_dbt_cloud_job_run_and_wait_for_completion
to display the DBT logs in prefect. How would I achieve this?brendan
04/05/2024, 9:54 AMtrigger_dbt_cloud_job_run
that would also be useful.Sean Williams
04/05/2024, 4:40 PMprefect-dbt
, but this gist from Jeremy Yeo at dbt Labs could be a good place to start getting dbt Cloud run logs into PrefectBryan
04/09/2024, 4:04 PMrun_results_artifact = get_dbt_cloud_run_artifact(
dbt_cloud_credentials = dbt_creds,
run_id = RUN_ID_RETURNED_FROM_YOUR_TRIGGER_RUN_FUNCTION,
path = "run_results.json"
# step=1
# 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 endpoint will return the artifacts compiled for the last step in the run.
)
I suppose you could throw this in a loop until the job completes where it outputs deltas of run_results_artifact between each loop. There's lots of options available to you using this function depending on your use case. I hope this helps!Sean Williams
04/09/2024, 4:11 PM