Skip to content
2020 IBM · General Motors · Platform

Replacing a paid governance tool with an in-house data quality framework

General Motors' data office decided not to renew its data governance tool. We built an in-house data quality framework in its place, one where analysts define rules in a spreadsheet and score their data on the cluster without writing Spark.

Context
IBM Morocco, for General Motors' Chief Data and Analytics Office (USA)
Role
Data Engineer
When
2020–2021

The situation

General Motors collects terabytes of data every day: connected-car sensors and telemetry, plants, customers, service. Its data and business analysts were spending much of their time on data quality problems such as duplicates, missing values, inconsistent formats and invalid codes.

GM’s Chief Data and Analytics Office had been managing data quality rules in a commercial data governance tool. When it decided not to renew the licence, the data quality team needed a replacement, and something that fit how its analysts actually worked.

What it had to do

The goal fits in one sentence: let the people who know the data define the rules, without needing a data engineer for every check. In practice that meant:

What we built

A Python framework, installed with pip, made of a few modules.

Single connector for all data sources

GM’s data lived in many places: Teradata, Hive and HDFS on Hadoop, PostgreSQL, Greenplum, Dremio and SharePoint. The framework put them all behind one connector interface, so loading a table or a file looked the same wherever it came from. Locally, tests ran against SQLite instead of a remote database, which made them much faster.

Rules in a spreadsheet

Rules became records in PostgreSQL, replacing the vendor’s rule repository. On top of that sat the factory: export rules to a spreadsheet, edit them, and upload them again. The factory linked each rule to its domain, its attributes and the table columns it checks, so analysts only had to fill in rows.

A rule such as “drive type must be one of AWD, FWD, RWD, 4x2, 4x4” or “vehicle ID must be unique and not null” became a row in a sheet. The framework turned it into logic that runs on the data.

Spark without the Spark setup

Analysts could send a job from their laptop or a Jupyter notebook to the YARN cluster with one call. The framework packaged the script and its dependencies and handled the submission. They focused on the check, not the cluster.

Counting on scores, instead of just pass or fail

Instead of dropping every row that broke a rule, the framework scores each important column on each dimension: for example, 100% integrity but 90% completeness. Analysts could see which source systems caused problems instead of throwing data away.

Later: a UI instead of a notebook

Later, we added a Streamlit interface with an OpenAPI backend. Users could generate data quality rules and launch the Spark jobs that apply them from a web page, without opening a notebook.

The result

GM’s data office replaced a licensed tool with a framework it owned. Rules moved out of a vendor’s system into a database and a spreadsheet that analysts controlled, and quality checks ran on GM’s own cluster. The team kept extending it to other departments.

If you’re weighing build vs buy

Replacing a vendor tool is worth it when you only use a few of its features and your users already have a workflow it doesn’t fit. Here that workflow was spreadsheets and notebooks, and the framework met analysts there instead of asking them to learn a new tool.