Manish Khatri
07/10/2023, 2:38 PMFreshnessPolicy
and AutoMaterializationPolicy
and so far it seems pretty cool that it can auto run a dbt model outside of a traditional “pipeline” 😎
However, before we consider moving away from the traditional pipeline, we would like to know if there’s a way that we can also have `dbt test`s running for each model that is materialised? Our current traditional pipeline uses a custom op that runs a dbt run
and dbt test
in sequence. The purpose of this is because we want to surface data quality issues as early as possible. Is there a way this can be done in the AutoMaterliazation
world with the dbt Assets we generated from load_assets_from_dbt_project(…)
?Tim Castillo
07/10/2023, 2:58 PM["run", "test"]
per model).Manish Khatri
07/10/2023, 3:32 PMuse_build_command
. If we did do this, can we still achieve the ability to do a dbt run + test
?
From the link you shared for your new dbt integration, it suggests that the run + test
can only be achieved with low effort by utilising Example Number 4.Tim Castillo
07/10/2023, 3:34 PMdbt build
rather than just run, which is a utility for dbt seed, snapshot, run, test.
and yes.Manish Khatri
07/10/2023, 4:21 PMMuhammad Jarir Kanji
07/11/2023, 4:02 PMdbt run
with dbt build
. I'm not a DBT snapshots expert so I'm happy to be corrected, but my understanding of snapshots is that there's only one schema for them, so unlike models (which can be saved to a different schema like dbt_cloud
, during local development), every time you do dbt snapshot
, you are updating your production snapshots. That means that if you do a dbt build
while testing stuff locally, you would be updating your prod snapshots!
That's a big (and mostly silent) side effect. As such, I've generally asked my team to avoid the dbt build
command entirely.
See here for more details: https://discourse.getdbt.com/t/using-dynamic-schemas-for-snapshots/1070.Manish Khatri
07/11/2023, 4:07 PMmain
branch as I’m doing some exploration on ways we can move from a traditional defined “pipeline” to leveraging Dagster’s unique automaterialization features.Manish Khatri
08/04/2023, 3:21 PM1.4.4
and using this tutorial which leverages the dagster-dbt project scaffold
to output the new way of loading assets in dbt as my playground.
I am unable to see how I can tell dagster to to a dbt run
and dbt test
using the new way. The scaffolded code runs a build
command, and Example 4 in the original link you shared isn’t valid in the final implementation (typing error). Any input on this would be greatly appreciated 🙂Tim Castillo
08/04/2023, 3:23 PM