{"canonical_url":"https://engineer.company/glossary/data-quality/","content_markdown":"# Data quality\n\n## What it is\n\nData quality describes whether the information available is fit for a particular\nuse. A dataset can have consistent field types and still lead to the wrong\ndecision. A map might accept every row in a delivery while some coordinates\nrefer to the wrong region. A billing export might have the expected fields while\nomitting a day. Define quality using the decisions each dataset supports and the\nconsequences when its information is incomplete, late or misleading.\n\nA useful definition includes several observable properties. Completeness asks\nwhether the records and fields needed for the task are present. Validity asks\nwhether a value falls inside the permitted domain or follows an agreed rule.\nUniqueness and consistency matter when rows identify real entities or should\nagree with another source. Timeliness describes how recent the information needs\nto be. Accuracy often requires a trusted comparison or a review in the world the\ndata describes.\n\nMeasurements put those properties into operation. A check might require one\nrecord per meter and hour, or a region identifier from a maintained reference\ntable. A different check can establish that all joins preserve the expected\nnumber of observations. Give the measurement a clear input and an expected\nresult, and name who relies on it.\n\n## Why it matters\n\nImagine an operations team using a map to direct maintenance crews. A set of\ncoordinates can be valid geometry and still be assigned to the wrong service\ndistrict. The result could send a crew to a different area while a spreadsheet\nappears complete. A check comparing each location with the appropriate regional\nboundary would serve that decision better than a schema check alone.\n\nQuality can also decline without a dramatic failure. A producer might send a\nslightly smaller extract each day until a report leaves out a meaningful part of\nthe business. A uniqueness test can catch repeated IDs after a retry. A coverage\ntest can detect missing periods or geographical areas. A ratio can be valuable\nwhere occasional bad records are expected, provided the denominator and the\nexpected range are documented. A percentage without a count can hide a sudden\ndrop in the number of records measured.\n\nDifferent consumers may need different thresholds. A draft dashboard can explain\nthat part of its input is late. An automated customer decision may need a\nstricter eligibility rule. Decide in advance which changes justify a warning,\nwhich prevent publication, and how recovery resumes. A quality check earns its\nplace when it leads to a useful response.\n\n## What it looks like in practice\n\nConsider a geographic delivery used for a daily outage dashboard. Agree on the\ngrain, possibly one observation per asset and time interval. Give each\nobservation a stable identifier. Validate the geometry, check that its region\nexists, compare its source timestamp with the reporting deadline and confirm\nthat each expected area contributed. Put these decisions in a small set of\nchecks whose results are visible to the people who prepare and consume the\nreport.\n\nIntroduce deliberately flawed fixtures. A duplicate row should trip the\nuniqueness rule. A location outside its assigned region should fail the spatial\nrelationship check. A late feed should leave a visible freshness result even if\nall its rows are well formed. Test what the downstream dashboard does in each\ncase. It might wait, show the last successful edition, or show the valid regions\nand mark the missing ones clearly.\n\nEngineer's\n[geographical-data quality case study](/portfolio/resolved-1000-issues-in-geographical-data/)\ndescribes identifying recurring geographical and time-series inconsistencies,\ncorrecting them with spatial tools and automating parts of the cleanup. It also\ndescribes delivering the corrected data to visualisations. Quality work has both\nparts. Teams need a way to find and repair the source problem and a way to\nestablish what behaviour the people reading the final product will actually see.\n\n## Where it goes wrong\n\nQuality checks can become a long collection of rules that nobody owns. Begin\nwith observable failures whose impact people can explain. Each rule should name\nits input, the expected condition, its owner and the action after failure. If a\nrule is allowed to warn for a defined period, give the exception an expiry and\nshow it alongside the measured result. A permanently ignored failure teaches\nreaders that the signal has little meaning.\n\nAutomatic repair can obscure the problem it was intended to resolve. Filling a\nmissing value may be appropriate for a visual estimate. A later reader should be\nable to distinguish an estimate from a source observation. Preserve useful\nprovenance and make repetition safe. A re-run after a correction should operate\non known inputs and create a clearly identifiable result.\n\nA rule also needs a denominator that reflects the data actually inspected.\nSuppose a file has eleven valid districts and one that failed to load. A check\nthat scans the rows alone can report that all observed district IDs are valid. A\nseparate comparison against the list expected from the source reveals the\nmissing district. Record whether the absent district was intentionally out of\nscope or needs a fresh delivery. The check's output should support that\ndistinction without requiring an operator to infer it from the passing count.\n\nFinally, measure the fit of the checks over time. Review real incidents to see\nwhich rule caught them and how quickly somebody could act. Record inputs that\nwere skipped because a feed was absent or a rule could not run. Compare results\nafter known changes to a source or its consumers. A quality process becomes\neasier to trust when it explains both which information passed and which\ninformation was outside what the checks could establish.\n\n## Further reading\n\n- [AWS Glue Data Quality Definition Language](https://docs.aws.amazon.com/glue/latest/dg/dqdl.html).\n  Documents one format for defining measurable rules.\n- [AWS Glue Data Quality rule types](https://docs.aws.amazon.com/glue/latest/dg/dqdl-rule-types.html).\n  Provides examples of completeness, uniqueness and related checks.\n- [dbt data tests](https://docs.getdbt.com/docs/build/data-tests). Describes\n  reusable and custom tests within a data transformation project.\n\n\u003chttps://engineer.company/glossary/data-quality/\u003e\n","date_modified":"2026-11-25T07:18:46Z","description":"Check geographic data for unique IDs, useful freshness and valid geometry, then prove that a repair worked.","formats":{"gemtext":"https://engineer.company/glossary/data-quality/index.gmi","gopher":"https://engineer.company/glossary/data-quality/gophermap","html":"https://engineer.company/glossary/data-quality/","json":"https://engineer.company/glossary/data-quality/index.json","markdown":"https://engineer.company/glossary/data-quality/index.md","pdf":"https://engineer.company/glossary/data-quality/index.pdf"},"kind":"page","language":"en","title":"What is data quality?","url":"https://engineer.company/glossary/data-quality/","version":1}