Skip to content

Commit 97073e7

Browse files
authored
[dagster-dbt] Fix enable_source_tests_as_checks on DbtProjectComponent (#32821)
## Summary & Motivation In the `@dbt_assets` decorator, it sets `allow_arbitrary_check_specs=True` on the multi-asset definition to allow for source tests. After upgrading to 1.12.2 this breaks because this setting isn't set on the multi-asset defined in the component. cc @OwenKephart ## How I Tested These Changes ## Changelog [dagster-dbt] Fixed an issue introduced in version 1.12.2 that caused the `DbtProjectComponent` to not produce asset checks for tests on dbt sources.
1 parent ea2a5a6 commit 97073e7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • python_modules/libraries/dagster-dbt/dagster_dbt/components/dbt_project

python_modules/libraries/dagster-dbt/dagster_dbt/components/dbt_project/component.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def build_defs_from_state(
394394
backfill_policy=op_spec.backfill_policy,
395395
pool=op_spec.pool,
396396
config_schema=self.config_cls.to_fields_dict() if self.config_cls else None,
397+
allow_arbitrary_check_specs=self.translator.settings.enable_source_tests_as_checks,
397398
)
398399
def _fn(context: dg.AssetExecutionContext):
399400
with _set_resolution_context(res_ctx):

0 commit comments

Comments
 (0)