0% found this document useful (0 votes)
48 views1 page

Data Completenes-Saccuracy-Consistency Testing

The document provides 3 methods for testing data quality after loading data from a source system to a target system: 1) Data completeness testing compares row counts between source and target tables. 2) Data accuracy testing compares values between columns in source and target tables. 3) Data consistency testing identifies columns that are inconsistent across multiple source tables.

Uploaded by

maheshpolasani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

Data Completenes-Saccuracy-Consistency Testing

The document provides 3 methods for testing data quality after loading data from a source system to a target system: 1) Data completeness testing compares row counts between source and target tables. 2) Data accuracy testing compares values between columns in source and target tables. 3) Data consistency testing identifies columns that are inconsistent across multiple source tables.

Uploaded by

maheshpolasani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like