https://dagster.io/ logo
#ask-community
Title
# ask-community
y

Yevhen Samoilenko

05/05/2022, 5:13 PM
Hi! With ops running dbt tests logic is quite clear - dbt_test_op(dbt_run_op()). But what about assets? What is the recommended way of running dbt tests for a set of materialized dbt assets?
p

prha

05/05/2022, 5:34 PM
For your dbt test job, it might not be creating a separate physical asset, but it could be represented in dagster as having created a separate “verified” form of the physical asset. cc @sandy @owen
y

Yevhen Samoilenko

05/05/2022, 5:36 PM
Thank you, @prha. Is there any link to docs on this topic?
o

owen

05/05/2022, 5:36 PM
Hey! I would actually model the results of dbt tests as AssetObservations -- in fact, for next week's release we're hoping to update the existing dbt Software Defined Asset implementation to optionally use the
dbt build
command so that this behavior is baked in to the integration.
👍 1
Basically, a dbt test is an observation on the state of an asset (the dbt model it corresponds to). These asset observations will show up in dagit on the page with all the other information on the model's past runs
y

Yevhen Samoilenko

05/05/2022, 5:43 PM
Thanks a lot! And a little bit out of topic question. What is the best way for a side effect logic after successfull asset materialization. Use case - we have an asset that represents tasks in a third-party system. And when this asset updates we should push updated tasks to this third-party system using REST api.
o

owen

05/05/2022, 5:47 PM
Good question -- the first thing I would think of is if it's reasonable to model these pushed / updated tasks in the third-party system as assets themselves, as this will probably be the easiest thing to fit into the SDA model.
❤️ 1
y

Yevhen Samoilenko

05/05/2022, 5:50 PM
Ok, thanks again!
12 Views