Hey guys, I`m new working prefect (love it so far...
# ask-community
b
Hey guys, I`m new working prefect (love it so far bowtie). Our plan is to use it as a job scheduler for our dwh. In general we are planning to do ELT with Fivetran and dbt, therefore we are also looking into dbt cloud. My first idea was using pyhton request library to simply trigger via api the dbt job, but I`m wondering if you guys have any smarter idea or what's the prefect-isch way to solve the task. I also looked into the dbt shell execution, but does it also work together with dbt cloud? Thanks in advance, Ben
k
Hey @Benjamin Holzknecht, so my understanding is that you’re using Prefect to orchestrate a process with both Fivetran and dbt. So my understanding in the dbt cloud is not supported in the current dbt task (it’s only shell execution). If you want to hit dbt cloud, you would indeed use the request library and hit the dbt job via the API.
I will ping some community members that I know have faced this and will ask them to give insight, but your setup looks right
🙌 1
m
hey @Benjamin Holzknecht - I'm a big fan of Prefect, Fivetran and dbt too. We've been using these in production for over 2 years now with a lot of success. However, we don't use dbt cloud, just the open source package. If you're going to use dbt cloud, I agree with Kevin, the way to trigger your dbt runs is via their API, and to do that I'd use the requests library. The DbtShellTask in the task library does not work with dbt cloud. It's intended for running dbt in your Prefect environment. The primary use case for this task is for creating your profiles.yml file and executing the dbt command. docs: https://docs.prefect.io/api/latest/tasks/dbt.html#dbtshelltask here is a good blog post about it: https://medium.com/slateco-blog/prefect-orchestrating-dbt-10f3ca0baea9
🙌 1
b
thanks for the input, very much appreciated!
a
Hi @Benjamin Holzknecht and @Mark McDonald, we now have a dbt cloud task thanks to @alehttps://docs.prefect.io/api/latest/tasks/dbt.html?#dbtcloudrunjob @Kevin Kho
m
that's great - nice job @ale!
🙌 1