I'm using dagster as a data orchestration tool, with its dbt integration. Since dagster is a data asset-centred framework, while dbt asset are materialised smoothly, I'm struggling to find a way to run dbt test dynamically within dagster framework. What I mean is, I have multiple tests with different schedules, and I want to dynamically run them without having to write dbt assets every time I add a new dbt test.
I can do dbt build
, which runs all the tests within a layer at the same scheduled time. This is not very dynamic.
For example, if I want to run a test on asset-a, I'd like a schedule that follows the schedule of asset-a. I tried using tags:
{{ config(
tags=["grexx_a"]
) }}
in both asset-a.sql and test_asset_a.sql but the test doesnt seem to run. Any suggestions?