https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
l

Lorenzo

01/20/2023, 2:25 PM
Hi everyone! Has someone an example project that contains a job that does some generic python computation, then triggers a dbt materialization, and after the materialization ends successfully, another python computation is triggered? 🌈
b

Binoy Shah

01/20/2023, 3:05 PM
Hey Lorenzo, we achieve that via
@multi_assets
annotations and correct
ins
and
outs
parameters so our flow is
@multi_asset [Meltano CLI for EL]
--->
@multi_asset[Pure Python Verification]
-->
@multi_asset[Dbt Transformations]
l

Lorenzo

01/20/2023, 3:08 PM
Wow thanks @Binoy Shah, so from what i see in the docs the idea would be to define a single block with this decorator and then make it do all the steps inside the multi_asset block?
b

Binoy Shah

01/20/2023, 3:16 PM
That’s how we achieve it.. actual code.. with some “secret” sauce removed
❤️ 1
l

Lorenzo

01/20/2023, 4:51 PM
Thank you so much @Binoy Shah!! 🙏Now I'll try to adapt it to my project. 🌈
o

owen

01/20/2023, 5:10 PM
hi @Lorenzo! there's also a complete example project here, showing how to combine specifically dbt and python, as well as a full tutorial which walks through setting up assets upstream and downstream of a dbt project 🙂
l

Lorenzo

01/23/2023, 8:26 AM
Thank you @owen 😄. I did try the examples that are on the repo but I didn't find a project similar to what my PM is asking for, and I am starting to think that it's not actually possible to implement in the way he's thinking. What I am trying to build is an hybrid. I'll attach a picture because it would be hard to explain 😂
o

owen

01/23/2023, 8:55 PM
what would those start/stop ops being doing? I think in most cases, it would be more ergonomic to define them as assets than ops, but it definitely depends on the exact use case.
❤️ 1
l

Lorenzo

01/24/2023, 9:27 AM
Thanks @owen. 🙌🏻 Yes, I ended up defining them as assets. They are going to do different operations, like sending an email or message, launching a query, writing a log file...
5 Views