Hi! With ops running dbt tests logic is quite clea...
# ask-community
y
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
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
Thank you, @prha. Is there any link to docs on this topic?
o
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
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
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
Ok, thanks again!