Request a demo

Glossary · Data observability and quality

What is data quality dimensions?

Data quality dimensions are the categories used to measure whether data is fit for use, most often accuracy, completeness, consistency, validity, uniqueness and timeliness or freshness, with volume often added for pipelines. Grouping rules by dimension shows what kind of quality problem a table has.

Also called: dimensions of data quality, data quality metrics, DQ dimensions, completeness, validity

The dimensions and how to check them

Each dimension answers a different question about a dataset. In BigQuery terms:

  • Completeness: are required values and rows present? Null rates on key columns, or expected rows that never arrived.
  • Validity: do values follow formats, types and allowed ranges? Regex checks on emails, ranges on percentages, allowed-value sets on status columns.
  • Uniqueness: are there unintended duplicates? Distinct counts on primary keys.
  • Consistency: do related facts agree? Referential integrity between orders and customers, or a daily summary that equals the sum of its detail table.
  • Accuracy: does the data match reality? Reconciliation against a source system or a business rule such as no transaction timestamps in the future.
  • Timeliness or freshness: is the data recent enough for its use?
  • Volume: did the expected amount of data arrive?

One query can score several dimensions for a partition, which makes trends easy to store and chart:

SELECT
  DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) AS day,
  ROUND(1 - SAFE_DIVIDE(COUNTIF(customer_id IS NULL), COUNT(*)), 4) AS completeness,
  ROUND(SAFE_DIVIDE(COUNTIF(REGEXP_CONTAINS(email, r'^[^@\s]+@[^@\s]+\.[^@\s]+$')), COUNTIF(email IS NOT NULL)), 4) AS validity,
  ROUND(SAFE_DIVIDE(COUNT(DISTINCT order_id), COUNT(*)), 4) AS uniqueness,
  ROUND(1 - SAFE_DIVIDE(COUNTIF(created_at > CURRENT_TIMESTAMP()), COUNT(*)), 4) AS accuracy_no_future_dates,
  COUNT(*) AS row_count
FROM analytics.orders
WHERE DATE(created_at) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY);

Each column is a share between 0 and 1, so a drop is easy to spot over time. Value checks like this read the data and are billed on every run; filtering on the partitioning column keeps them to one day's data.

In Google Cloud

Knowledge Catalog (formerly Dataplex Universal Catalog) auto data quality requires every rule to belong to a dimension and reports scores per dimension. Its rule types map onto them: NonNullExpectation for completeness, RegexExpectation, RangeExpectation and SetExpectation for validity, uniqueness checks, and custom SQL rules for consistency, accuracy, freshness and volume. Custom dimension names, such as TIMELINESS, are allowed through the API.

Using dimensions well

  • Pick per dataset. A clickstream table may care about volume and freshness; a finance ledger about accuracy and consistency.
  • Separate the dimensions. "Quality 92%" hides whether rows are missing or wrong; per-dimension scores point to the cause.
  • Monitor the cheap ones everywhere. Freshness and volume come from metadata at almost no cost; keep value-reading rules for critical columns.
  • Write expectations down. Dimensions with targets belong in data contracts and SLOs.

FAQ

How many data quality dimensions are there?

There is no single standard list. Six appear in many frameworks: accuracy, completeness, consistency, validity, uniqueness and timeliness. Google's Knowledge Catalog data quality scans use seven predefined dimensions: freshness, volume, completeness, validity, consistency, accuracy and uniqueness.

Which dimension is hardest to measure?

Accuracy, because it needs a trusted reference: an authoritative source, a reconciliation total or a real-world rule. The others can usually be checked from the data itself or from metadata.

Read next

Browse the full glossary

Observability for every BigQuery table, in about 15 minutes

Masthead detects freshness, volume and schema anomalies, monitors pipeline errors and maps column-level lineage across all your projects, from logs and metadata only.