Data Engineering Data Quality and Testing 1 — Questions and Answers
Question 1: Which data quality dimension measures whether data values fall within expected ranges or conform to defined rules?
- Completeness
- Uniqueness
- Validity (Correct answer)
- Timeliness
Correct answer: Validity
Validity checks whether data conforms to defined formats, ranges, and business rules — for example, age must be between 0 and 150.
Question 2: In dbt (data build tool), what type of test checks that a column contains no NULL values?
- relationships
- unique
- not_null (Correct answer)
- accepted_values
Correct answer: not_null
The `not_null` test in dbt asserts that a specified column has no NULL values in the dataset.
Question 3: What is a 'data contract' in modern data engineering?
- A legal agreement between data vendors
- A formal agreement defining data schema, quality, and SLAs between data producers and consumers (Correct answer)
- A database constraint enforcing referential integrity
- A schema registry entry for streaming topics
Correct answer: A formal agreement defining data schema, quality, and SLAs between data producers and consumers
A data contract is a formal specification that defines what data a producer will deliver, including schema, quality guarantees, and update frequency.
Question 4: Which testing approach validates the statistical properties and distributions of data rather than individual row correctness?
- Unit testing
- Integration testing
- Statistical/distribution testing (Correct answer)
- Schema validation testing
Correct answer: Statistical/distribution testing
Statistical testing checks that data distributions, mean values, standard deviations, and outlier rates remain within expected bounds.
Question 5: What does 'data freshness' measure in data quality monitoring?
- Whether data contains correct values
- How recently the data was updated relative to its expected update schedule (Correct answer)
- The number of duplicate records in a dataset
- The completeness of required fields
Correct answer: How recently the data was updated relative to its expected update schedule
Data freshness measures whether data has been updated within its expected time window, detecting pipeline failures or delays.
Question 6: In Great Expectations, what is an 'Expectation Suite'?
- A collection of individual expectations that define what valid data looks like (Correct answer)
- A test runner that executes SQL validation queries
- A UI dashboard for viewing data quality metrics
- A schema registry for validating JSON payloads
Correct answer: A collection of individual expectations that define what valid data looks like
An Expectation Suite is a named collection of expectations that together define the complete quality specification for a dataset.
Which data quality dimension measures whether data values fall within expected ranges or conform to defined rules?