Hi everyone,
I am using the latest version of DQD (version 2.5).
- Running DQD on our CDM generated the following output:
- Checking the output/errors folder and looking at the content of the first file (highlighted in yellow):
- The code generated in the file is in the code snippet below:
DBMS:
sql serverError:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name ‘ADMITTING_SOURCE_CONCEPT_ID’.SQL:
/*********
FIELD_CDM_DATATYPEAt a minimum, for each field that is supposed to be an integer, verify it is an integer
Parameters used in this template:
schema = cdm
cdmTableName = VISIT_OCCURRENCE
cdmFieldName = ADMITTING_SOURCE_CONCEPT_ID
**********/SELECT
num_violated_rows,
CASE
WHEN denominator.num_rows = 0 THEN 0
ELSE 1.0num_violated_rows/denominator.num_rows
END AS pct_violated_rows,
denominator.num_rows AS num_denominator_rows
FROM
(
SELECT
COUNT_BIG(violated_rows.violating_field) AS num_violated_rows
FROM
(
/violatedRowsBegin/
SELECT
‘VISIT_OCCURRENCE.ADMITTING_SOURCE_CONCEPT_ID’ AS violating_field,
cdmTable.
FROM cdm.VISIT_OCCURRENCE cdmTable
WHERE
(ISNUMERIC(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) = 0
OR (ISNUMERIC(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) = 1
AND CHARINDEX(’.’, CAST(ABS(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) AS varchar)) != 0))
AND cdmTable.ADMITTING_SOURCE_CONCEPT_ID IS NOT NULL
/violatedRowsEnd/
) violated_rows
) violated_row_count,
(
SELECT
COUNT_BIG(*) AS num_rows
FROM cdm.VISIT_OCCURRENCE
) denominator
;R version:
R version 4.2.2 Patched (2022-11-10 r83330)Platform:
x86_64-pc-linux-gnuAttached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base
Other attached packages:
- dplyr (1.1.2)
- DataQualityDashboard (2.5.0)
- DatabaseConnector (6.3.0)
- It seems the field/column ADMITTING_SOURCE_CONCEPT_ID is not present in the visit_detail table resulting in the error generated:
Any ideas on how to resolve this issue?
Many thanks,
Solmaz