Describe data quality checks

12.8515.49
Clear

1. Uniqueness Check

Purpose: Ensure each customer record is uniquely identified.
Check:

  • Verify that customer_id values are unique.
    Example Query (SQL):
sql
SELECT customer_id, COUNT(*)
FROM customers
GROUP BY customer_id
HAVING COUNT(*) > 1;

If the query returns any rows, duplicates exist and need resolution.


2. Completeness Check

Purpose: Confirm all required fields contain values.
Check:

  • Validate that critical fields (customer_id, name, email, dob) are not null.
    Example Query (SQL):
sql
SELECT *
FROM customers
WHERE customer_id IS NULL OR name IS NULL OR email IS NULL OR dob IS NULL;

Empty or null fields indicate missing data that must be addressed.


3. Validity Check

Purpose: Ensure data conforms to expected formats and standards.
Check:

  • Verify that email follows a valid format using regex.
  • Confirm that dob contains valid dates. Example Query (SQL for Email Validation):
sql
SELECT *
FROM customers
WHERE email NOT LIKE '%_@__%.__%';

Example Query (SQL for Date Validation):

sql
SELECT *
FROM customers
WHERE TRY_CAST(dob AS DATE) IS NULL;

4. Consistency Check

Purpose: Confirm consistent values across related fields.
Check:

  • Ensure country values match an approved list of countries (e.g., ISO codes).
    Example Query (SQL):
sql
SELECT DISTINCT country
FROM customers
WHERE country NOT IN ('USA', 'Canada', 'UK', 'Australia', 'Germany');

Mismatched values need to be standardized.


5. Timeliness Check

Purpose: Ensure data is current and within an acceptable timeframe.
Check:

  • Verify that dob indicates customers are within a valid age range (e.g., 18–120 years).
    Example Query (SQL):
sql
SELECT *
FROM customers
WHERE DATEDIFF(YEAR, dob, GETDATE()) NOT BETWEEN 18 AND 120;

Records outside the valid age range may indicate data entry errors.

Describe data quality checks
12.8515.49
Clear

How to Use Prompts

Step 1: Download the prompt after purchase.

Step 2: Paste the prompt into your text-generation tool (e.g., ChatGPT).

Step 3: Adjust parameters or use it directly to achieve your goals.

Describe data quality checks
12.8515.49
Clear

License Terms

Regular License:

  • Allowed for personal or non-commercial projects.
  • Cannot be resold or redistributed.
  • Limited to a single use.

Extended License:

  • Allowed for commercial projects and products.
  • Can be included in resold products, subject to restrictions.
  • Suitable for multiple uses.
Describe data quality checks
12.8515.49
Clear