Create "standalone" test tasks even when they are not attached to models/seeds/snapshots #959
Labels
area:rendering
Related to rendering, like Jinja, Airflow tasks, etc
dbt:test
Primarily related to dbt test command or functionality
Milestone
Context
On 8 March 2024, Stephen Tang posted in the #airflow-dbt Slack channel (link to the thread):
Several people joined the discussion in the thread.
Some approaches that can be used, as of Cosmos 1.4:
Render all test nodes as a single Airflow Task by using the correspondent
DbtTestOperator
depending on the desired execution mode (as an example, DbtTestLocalOperator if using the local execution mode)Render all test nodes as a single Airflow Task by using
TestBehavior.AFTER_ALL
, following the docs:And how it is rendered:
Desired behavior
(Open for discussion!)
It's unclear what the best behavior by default would be. Do we want users to be able to render each test as an individual task in Airflow? Wouldn't this be overkill?
Should we render "standalone" tests by default, similar to the DAG image I shared, as part of
TestBehaviour.AFTER_EACH
so most tests are still run grouped, but tests that are "parentless" would be rendered individually?Or would it make more sense to have a new
TestBehaviour.STANDALONE
, to be used explicitly by people who want individual tests—regardless of whether they have parents or not—to be rendered as stand-alone tasks outside ofTaskGroup
s?Depending on the desired approach, this would be a breaking change, so we may need to introduce a feature flag.
The text was updated successfully, but these errors were encountered: