4/12/23, 12:51 PM New chat
New chat
1. Data completeness testing: To test if all the expected data has been extracted from the
source system, you can use the following query:
sql Copy code
SELECT COUNT(*) FROM source_table;
This will give you the total number of rows in the source table. You can then compare this
with the number of rows in the target table after loading the data.
2. Data accuracy testing: To test if the data has been transformed accurately, you can use
the following query:
vbnet Copy code
SELECT SUM(case when source_column = target_column then 1 else 0 end) AS acc
SUM(case when source_column != target_column then 1 else 0 end) AS in
FROM source_table s
JOIN target_table t ON s.id = t.id;
This query will give you the number of rows that have been transformed accurately and
inaccurately. You can then investigate the inaccurate rows to identify the cause of the issue.
3. Data consistency testing: To test if the data is consistent across different source systems,
you can use the following query:
sql Copy code
SELECT column1, column2, column3, COUNT(*) as frequency
FROM source_table
GROUP BY column1, column2, column3
HAVING COUNT(*) > 1;
Send a message...
ChatGPT
ThisMar 23 Version.
query Free you
will give Research
the Preview. ChatGPT may
list of columns produce
that inaccurate
are not information
consistent aboutdifferent
across people, places, or facts
source
https://chat.openai.com/chat 1/1