Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dbt): allow dbt tests to be modeled as asset checks #16324

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

rexledesma
Copy link
Contributor

@rexledesma rexledesma commented Sep 5, 2023

Summary & Motivation

As the title.

Currently, users will have to opt-in to modelling their dbt tests as Dagster asset checks. This is because the API's for asset checks are currently experimental, and we do not want to break users of the public stable API's for ingesting dbt models as Dagster software-defined assets.

So, to enable this feature, users will have to configure the following metadata on their dbt project tests:

# dbt_project.yml
tests:
  +meta:
    dagster:
      asset_check: True

Or, tests can be individually turned on using the dbt config block or property file: https://docs.getdbt.com/reference/test-configs#test-specific-configurations.

How I Tested These Changes

pytest

@rexledesma
Copy link
Contributor Author

rexledesma commented Sep 5, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@rexledesma rexledesma force-pushed the rl/asset-checks-dbt branch 4 times, most recently from e892520 to e352623 Compare September 5, 2023 21:26
@rexledesma rexledesma self-assigned this Sep 5, 2023
Copy link
Contributor

@johannkm johannkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I'm surprised how straightforwards this is

@rexledesma rexledesma changed the base branch from master to rl/add-test-dbt-project-dagster-asset-checks September 6, 2023 16:34
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-ihtih38ry-elementl.vercel.app
https://rl-asset-checks-dbt.core-storybook.dagster-docs.io

Built with commit cad2931.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-i6gg0v693-elementl.vercel.app
https://rl-asset-checks-dbt.dagster.dagster-docs.io

Direct link to changed pages:

@rexledesma rexledesma force-pushed the rl/add-test-dbt-project-dagster-asset-checks branch from 2dc4f7a to 0e0110e Compare September 6, 2023 18:43
@rexledesma rexledesma marked this pull request as ready for review September 6, 2023 18:43
@rexledesma rexledesma force-pushed the rl/asset-checks-dbt branch 2 times, most recently from 88de858 to f8c9ab8 Compare September 6, 2023 19:54
@rexledesma rexledesma force-pushed the rl/add-test-dbt-project-dagster-asset-checks branch from 0e0110e to 7f47784 Compare September 6, 2023 20:12
Base automatically changed from rl/add-test-dbt-project-dagster-asset-checks to master September 6, 2023 20:12
@rexledesma rexledesma merged commit 61d66db into master Sep 6, 2023
@rexledesma rexledesma deleted the rl/asset-checks-dbt branch September 6, 2023 20:13
zyd14 pushed a commit to zyd14/dagster that referenced this pull request Sep 15, 2023
…16324)

## Summary & Motivation
As the title.

Currently, users will have to opt-in to modelling their dbt tests as
Dagster asset checks. This is because the API's for asset checks are
currently experimental, and we do not want to break users of the public
stable API's for ingesting dbt models as Dagster software-defined
assets.

So, to enable this feature, users will have to configure the following
metadata on their dbt project tests:

```yaml
# dbt_project.yml
tests:
  +meta:
    dagster:
      asset_check: True
```

Or, tests can be individually turned on using the dbt config block or
property file:
https://docs.getdbt.com/reference/test-configs#test-specific-configurations.

## How I Tested These Changes
pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants