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

Check cdmTable and cdmField error in query #567

Closed
dassagichnicht opened this issue Sep 11, 2024 · 2 comments
Closed

Check cdmTable and cdmField error in query #567

dassagichnicht opened this issue Sep 11, 2024 · 2 comments

Comments

@dassagichnicht
Copy link

dassagichnicht commented Sep 11, 2024

In the check "cdmTable" the most inner select statement is the following
SELECT CASE WHEN COUNT(*) = 0 THEN 0 ELSE 0 END AS num_violated_rows FROM hob_valid.CONDITION_OCCURRENCE cdmTable GROUP BY 1
However, this query results in 0 rows if the table is empty.

I think deleting the GROUP BY 1 solves the issue.

The same holds true for the check "cdmField".

Unfortunately, I couldn't find the files in which the checks are defined to check if the problem is still there or if I'm just using an old version.

@dassagichnicht dassagichnicht changed the title Check cdmTable error in query Check cdmTable and cdmField error in query Sep 11, 2024
@katy-sadowski
Copy link
Collaborator

Please let me know what version of DataQualityDashboard you are running. The GROUP BY clause is not in the current source SQL for this check: https://github.com/OHDSI/DataQualityDashboard/blob/main/inst/sql/sql_server/table_cdm_table.sql. However, if you are on the latest version of the package it's possible this is a SqlRender issue.

@katy-sadowski
Copy link
Collaborator

@dassagichnicht I am going to close this issue for now but please let me know if you continue to have problems after updating the package.

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

No branches or pull requests

2 participants