Skip to content

Enhance test when wrong metric is set #111

Open
bachng2017 wants to merge 3 commits intore-data:mainfrom
bachng2017:enhance_test
Open

Enhance test when wrong metric is set #111
bachng2017 wants to merge 3 commits intore-data:mainfrom
bachng2017:enhance_test

Conversation

@bachng2017
Copy link
Copy Markdown
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
Copy Markdown
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