Hi everyone, Probably a beginner question. How to...
# integration-dbt
c
Hi everyone, Probably a beginner question. How to materialize assets + downstream assets into an OP / JOB ? I have all my DBT models as dagster assets. I now want to run an asset (or a dbt model), and all its downstream assets, jsut like the equivalent of : "dbt run --select +my_model" In the example, provided here : https://docs.dagster.io/concepts/assets/asset-materializations either one asset is selected, either it uses dbt "tags". Which is not what i'm trying to achieve. Anyone knows how to do so ? 👀
a
How about an "asset based job"?
Unlike jobs created using the job decorator where you explicitly define the dependencies when you create the job, the topology of an asset-based job is based on the assets and their dependencies.
c
That seems to be a good idea, I'll look further to find how to implement this for my use case ! Thanks Andrea
I could implement it successfully. Therefore, it being a job is not very convenient since I cannot put it into a job step to order my tasks.
Example : Extract & Load through my python job with 2 ops , then materialize the Model (Transform step).
Not sure if i'm missing something
What i'm gonna do is to check if i could translate my jobs into assets 👀
Actually, the asset job doesn't seem to work on my side. It only runs the selected asset, but not all their dependencies. I might have done something wrong ? (cf : screen)
image.png
l
Rather than directly specifying the selection you can create an
AssetSelection
that allows you to specify both an asset as well as assets upstream or downstream of that asset with arbitrary depth.