Struggling with prefect 3 and dbt cloud job run. Trying this example from docshttps://docs-3.prefect.io/integrations/prefect-dbt/index#run-a-dbt-cloud-job-and-wait-for-completion but this leaves me with a question if/how to do run from deployments. The example calls main flow with _asyncio.run(run_dbt_job_flow())_ but I'd rather do something like _main_flow.from_source().deploy(),_ with dbt cloud job as a task but I'm unsure how to adapt. any examples or input on this?
Jørgen Nygaard
11/28/2024, 2:30 PM
Had it kind of working, but the error "httpx.ConnectError: All connection attempts failed" confused me.
Turned out I was missing the dbt domain in the dbt Cloud Credentials block, since the domain field is optional..
Jørgen Nygaard
11/29/2024, 6:53 AM
Ok so seems like it can be run "as is" without modifying the deployment config. Thought I had to do something due to a network error but that was due to missing dbt domain as mentioned above.
Also value for retry count in documentation made the dbt cloud job instantly return as failed even in if it passed. had to set it to 1 or remove it (default to 1?) to make it await the cloud job and return correct status