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

Enhance test when wrong metric is set #111

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bachng2017
Copy link
Contributor

What

Try to solve this issue by query: re-data/re-data#395

How

Implement new test mechanism to check if metric (column) is correct might be an option but here we introduce a solution by sql query only. The query might be a little bit tricky and the solution is not very intuitive.

@davidzajac1
Copy link
Collaborator

@bachng2017 thanks for the PR! I tried testing this locally and it looks like the filters query {%- set filters = dbt_utils.get_query_results_as_dict(sql) -%} isn't returning anything thus when it compiles has the following snippet of SQL below resulting in an error:

where
    case
    
    else true
    end

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