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

[Q1C2] More consistent, configurable tests #3066

Closed
jtcohen6 opened this issue Feb 10, 2021 · 2 comments
Closed

[Q1C2] More consistent, configurable tests #3066

jtcohen6 opened this issue Feb 10, 2021 · 2 comments
Labels
dbt tests Issues related to built-in dbt testing functionality Epic
Milestone

Comments

@jtcohen6
Copy link
Contributor

The next version of dbt is going to focus on improving dbt test, along the lines of:

  • More consistency between schema and data tests
  • More consistency between tests and other dbt resources
  • Straightforward, compelling extensions around filters, limits, expectation thresholds
  • Improved development-time debugging by storing failing records in the database
  • Rethinking, as appropriate, the YAML specs currently used to define tests

There are many open issues in the v0.20.0 milestone with the tests tag. This epic will track our broader initiative over the next several weeks, as it's likely we'll consolidate several open issues and close/rewrite others.

@jtcohen6 jtcohen6 added enhancement New feature or request Epic dbt tests Issues related to built-in dbt testing functionality and removed enhancement New feature or request labels Feb 10, 2021
@jtcohen6 jtcohen6 added this to the Margaret Mead milestone Feb 10, 2021
@jtcohen6
Copy link
Contributor Author

jtcohen6 commented Mar 10, 2021

@kwigley I wanted to summarize our conversation yesterday about how we're thinking of proceeding:

  1. A test materialization, that performs node compilation + context management currently in python
    a. Hook it up to one-off tests (f.k.a. "data tests", Move data test "rendering" out of python compilation step #3154)
    b. Hook it up to generic macro tests (f.k.a. "schema tests," Use test materialization when executing ✨generic✨ tests #3192)
    c. Materialization handles the report-back of adapter response / result status (part of [CT-1635] Populate adapter_response for tests + sources #2964)
  2. A new test block, to replace test__ macros (Schema test blocks #1173)
  3. Net-new configs and resource properties that will make all tests more powerful and consistent (e.g. Threshold argument for Test Severity #2219, Allow instances of generic data tests to be documented #2578, parts of Schema test blocks #1173, with more issues TK)
  4. Storing test failures in the database for quicker debugging in development (Storing test results in the database #2593)

Why this order of operations? We believe 1+2 represent foundational work that will pay dividends by smoothing the path toward the bigger wins in 3+4. Ideally, we ship the latter in v0.20.0 as reward/justification for the breaking changes earlier on. Even if we don't get there in time, we'll have built the right foundation to add them later on.


Smaller opportunities

  • Should we change the syntax of the relationships tests to make it more consistent with other Jinja-in-YAML?
  • Should we add/expand builtin generic tests (i.e. upstream some of the functionality from dbt-utils)?

Honorable mentions

Bigger things we should do before v1.0, but which I think are out of scope of the current effort:


Future art

Lots more to say, think, and do here over the long run. Not prerequisites to v1.0.

@jtcohen6 jtcohen6 changed the title More consistent, configurable tests [Q1C2] More consistent, configurable tests Mar 23, 2021
@joellabes
Copy link
Contributor

  • Should we add/expand builtin generic tests (i.e. upstream some of the functionality from dbt-utils)?

At a minimum, I'd love to see the _where versions of each of the core tests brought in as first-class citizens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt tests Issues related to built-in dbt testing functionality Epic
Projects
None yet
Development

No branches or pull requests

2 participants