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

Conditional severity test severity: error is not working #4277

Closed
antongoncharuk opened this issue Nov 13, 2021 · 1 comment
Closed

Conditional severity test severity: error is not working #4277

antongoncharuk opened this issue Nov 13, 2021 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@antongoncharuk
Copy link

antongoncharuk commented Nov 13, 2021

Hey team, I’m trying to set a conditional severity test using the following guidance, to throw an error if there are more than 3 fails, to warn if there are more than 0 and pass otherwise. But it is not working, I’m still getting the following error - Got 3 results, configured to fail if != 0. Please see the screenshot attached. Running with dbt=0.21.0.

  - name: organization_id
    description: 
    tests:
      - not_null
      - unique:
          config:
            severity: error
            error_if: "> 3"
            warn_if: "> 0"

ScreenShot 2021-11-12 at 22 14 54@2x

Note: works when severity: warn

@jtcohen6 jtcohen6 added bug Something isn't working triage labels Nov 15, 2021
@jtcohen6
Copy link
Contributor

@antongoncharuk Thanks for the report!

I believe this is the result of a typo, included in v0.21.0:

if self.error_if is not None:
config['error_id'] = self.error_if

This bug was previously reported (#4051), and fixed (#4070) for a v0.21.1 patch release, which is currently available as a release candidate. Could you try installing that, and confirm that it fixes the issue?

pip install dbt==0.21.1rc1

We're hoping to have a final v0.21.1 release next week. In the meantime, I'm going to close this as a duplicate.

@jtcohen6 jtcohen6 added duplicate This issue or pull request already exists and removed triage labels Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants