Aller au contenu

Leçon 10 · Data Quality

Data Quality Dimensions

Learn accuracy, completeness, consistency, validity, uniqueness and timeliness, measure each with SQL, and set quality targets that match the business purpose.

Data is high quality when it is fit for its purpose. A postal code that is good enough for a regional sales map may not be good enough for delivering parcels. So you cannot ask "is this data good?" without asking "good for what?"

To talk about quality precisely, teams split it into dimensions. Different books list different sets. The six below are common and practical.

Six common dimensions

Accuracy Matches reality
Completeness Needed values present
Consistency No contradictions
1 / 2

What each dimension means

Accuracy asks whether the value matches the real world. It is the hardest to measure, because you need a trusted reference or a verification step, such as contacting the customer or checking a document.

Completeness asks whether required values are present. Define "required" carefully. A missing middle name is normal; a missing delivery address blocks an order.

Validity asks whether a value follows its rules: type, format, range or allowed list. A valid value can still be wrong. 1990-01-01 is a valid date even if it is not the person's birthday.

Consistency asks whether values agree with each other, within a record or between systems. An order shipped before it was placed is inconsistent.

Uniqueness asks whether each real thing appears once where it should.

Timeliness asks whether data is current enough and arrives when needed.

You may also meet integrity (relationships between records are intact), conformity and others. Use the terms your organization agrees on and define them.

Measuring with SQL

Most dimensions can be measured as a percentage: good rows divided by checked rows. Here is a small table with deliberate flaws.

SQL Measure quality dimensions with SQL

Press Run (or Ctrl + Enter) to see the result here.

Notice how the denominator changes. Email validity is measured among emails that exist, because missing emails are already counted by completeness. Always write down exactly what each percentage divides by. Notice also that none of these checks measures accuracy: [email protected] might belong to someone else.

Setting targets

A target says how good is good enough, based on impact. For example:

Rule Warning Failing Why it matters
Delivery address present below 99.5% below 98% Orders cannot ship
Middle name present not tracked not tracked No business need
Birth date valid below 99% below 97% Age checks depend on it

These numbers are illustrations. Demanding 100% everywhere wastes effort on data that does not matter and can push people to enter fake values just to pass the rule.

Cost of poor quality

To get support, connect a dimension to a concrete cost: returned parcels, duplicate marketing letters, delayed invoices or staff hours spent reconciling reports. Measure your own costs rather than quoting generic industry figures.

Watch out for fake completeness

Required fields invite placeholders such as N/A, 0000, [email protected] or the default first option in a list. These pass completeness and sometimes validity while carrying no information. Add checks for known placeholders and look at the most frequent values in each column. A suspiciously popular birth date is a classic sign.

A single "quality score" can hide serious failures. An average of 95% may include a critical rule at 60%. Always show critical rules separately.

A worked example: matching targets to use

A fictional clinic network uses patient phone numbers for two purposes: sending appointment reminders and building a yearly summary of patients by area. The same field has very different importance in each. For reminders, a missing or wrong number means a missed appointment, so completeness and accuracy matter a lot, and verifying the number at each visit may be worth the effort. For the yearly summary, phone numbers are not needed at all.

Write quality expectations per use, then manage the field to the strictest use that really matters.

Measuring accuracy in practice

Because accuracy needs an external reference, teams often sample. Choose a random sample, check each record against a trusted source or the person concerned, and report the share that was correct along with the sample size. A sample of 20 gives only a rough picture; a larger one gives more confidence. Be honest about this uncertainty and do not report a sample result as if every record had been checked.

Verification must also respect privacy. Use only checks that your purpose and rules allow, and do not collect extra information just to test a value.

Dimensions can conflict

Improving one dimension can cost another. Waiting for every late record makes a report more complete but less timely. Forcing a value into every field raises completeness but lowers accuracy if people guess. Discuss these trade-offs openly with data consumers and write down which side matters more for each use.

Record the measurement

When you publish a quality figure, record how it was produced: the dataset, the date, the filter, the numerator, the denominator and any exclusions. Without this, two people can report different completeness values for the same field and both be correct. A short note under each number also makes later comparisons fair. If you change how a measure is calculated, say so on the chart, so nobody mistakes a new method for a real improvement.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A birth date is correctly formatted but belongs to a different person. Which dimension fails?

    The format is valid, but the value does not match reality.
  2. 2. An order's ship date is earlier than its order date. Which dimension is violated?

    The two values contradict each other.
  3. 3. Why is asking for 100% on every field a poor idea?

    Targets should reflect purpose and impact.
  4. 4. What does it mean that data quality is fitness for purpose?

    The same data may be adequate for one use and inadequate for another.

Summary

  • Quality means fitness for a specific purpose.
  • Accuracy, completeness, validity, consistency, uniqueness and timeliness are practical dimensions.
  • State the denominator for every percentage.
  • Set targets by business impact and show critical rules separately.
  • Look for placeholder values that fake completeness.

Next: Data Profiling and Quality Rules

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.