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

Generic tests: custom names, alt format #1269

Closed
1 task done
jtcohen6 opened this issue Mar 25, 2022 · 0 comments · Fixed by #1293
Closed
1 task done

Generic tests: custom names, alt format #1269

jtcohen6 opened this issue Mar 25, 2022 · 0 comments · Fixed by #1293
Assignees
Labels
content Improvements or additions to content dbt-core v1.1 Docs impact for the v1.1 release (April 2022) improvement Use this when an area of the docs needs improvement as it's currently unclear size: x-small This change will take under 3 hours to fix.

Comments

@jtcohen6
Copy link
Collaborator

Contributions

  • I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates

https://docs.getdbt.com/reference/resource-properties/tests

What part(s) of the page would you like to see updated?

Reflect that this is possible:

models:
  - name: my_model
    columns:
      - name: id
        tests:
          - unique:
              name: my_cool_test

Specifically to:

Also, reflect that dbt now supports an alt format for defining generic tests with lots of properties:

models:
  - name: my_model
    columns:
      - name: id
        tests:
          # og format
          - accepted_values:
              name: only_allow_abc
              values: ['a', 'b', 'c']
              config:
                severity: warn
                where: 1=1
          # alt format
          - name: only_allow_abc
            test_name: accepted_values
            values: ['a', 'b', 'c']
            config:
              severity: warn
              where: 1=1

Additional information

No response

@jtcohen6 jtcohen6 added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear dbt-core v1.1 Docs impact for the v1.1 release (April 2022) idea Proposes an idea for new content size: x-small This change will take under 3 hours to fix. labels Mar 25, 2022
@jtcohen6 jtcohen6 self-assigned this Apr 4, 2022
@runleonarun runleonarun removed the idea Proposes an idea for new content label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt-core v1.1 Docs impact for the v1.1 release (April 2022) improvement Use this when an area of the docs needs improvement as it's currently unclear size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants