What is data profiling?

Data profiling computes statistics that describe what is in your data: distributions, null rates, distinct counts, minimums and maximums, and value patterns. It tells you what a table actually contains before you decide what to test, and it is how you find problems nobody thought to check for, such as placeholder values, dates stored as text, and keys that aren't unique.

Key points

  • Data profiling computes statistics that describe what is in your data: distributions, null rates, distinct counts, minimums and maximums, and value patterns.
  • Data profiling splits into structure discovery for format and consistency, content discovery for errors in individual records, and relationship discovery for how tables and columns connect.
  • A profile describes what the data is, not what it should be: business rules still need a person, or an assistant reading the profile with a person checking its work.
  • SQL Server Profiler is a different Microsoft tool, for tracing server events, and Microsoft Learn lists it as deprecated in favor of Extended Events.
  • DataOps TestGen profiles 55 characteristics per column inside the database, flags 32 kinds of hygiene issue, and turns the profile into tests from 34 test types.

Data profiling is the first thing to run on a table you didn’t build. It answers “what’s actually in here?” with numbers instead of assumptions.

This is the same definition DataKitchen uses in its open-source data profiling landscape, which compares the tools in depth.

What a profile measures

MeasureWhat it tells you
Row countHow big the table is, and whether it changed
Null and blank shareWhich columns are really optional
Distinct countWhether a column could be a key, or is a short code list
Minimum and maximumImpossible values: negative quantities, dates in 1900 or 2099
Length rangeTruncation, or text where a code was expected
PatternsFormats such as AAA-9999, and the rows that break them
Frequent valuesPlaceholders such as N/A, UNKNOWN, or 0
Inferred typeDates or numbers stored as text

These fall into three kinds of discovery: structure (format and consistency), content (errors in individual records), and relationships (how tables and columns connect).

A SQL Server example

Here is a hand-written profile of one column, Email, in a dbo.Customer table:

SELECT
    COUNT(*)                                        AS row_count,
    COUNT(*) - COUNT(Email)                         AS null_count,
    SUM(CASE WHEN LTRIM(RTRIM(Email)) = '' THEN 1 ELSE 0 END) AS blank_count,
    COUNT(DISTINCT Email)                           AS distinct_count,
    MIN(LEN(Email))                                 AS min_length,
    MAX(LEN(Email))                                 AS max_length,
    SUM(CASE WHEN Email NOT LIKE '%_@_%._%' THEN 1 ELSE 0 END) AS bad_format_count
FROM dbo.Customer;

SELECT TOP (10) Email, COUNT(*) AS occurrences
FROM dbo.Customer
GROUP BY Email
ORDER BY occurrences DESC;

The first query gives the shape of the column. The second shows the most frequent values, which is where none@none.com and test@test.com turn up. Two habits of SQL Server to keep in mind: LEN ignores trailing spaces, and a case-insensitive collation counts Bob@x.com and bob@x.com as one distinct value.

That’s one column. A database with 300 tables and 5,000 columns needs this for every one, which is why data profiling is usually done by a tool.

From a profile to tests

A profile is a snapshot. Its value comes from what you do next:

  1. Fix hygiene problems the profile exposes: placeholders, mixed types, leading spaces.
  2. Turn observations into tests. A column that has never been null should stay that way. A status column with five codes should keep to those five.
  3. Add what the data can’t tell you. A profile learns what the data is, not what it should be. “Ship date is on or after order date” comes from a person.

DataOps TestGen does the first two automatically. It runs data profiling as SQL inside SQL Server, Azure SQL, Synapse, Fabric, and other databases, measures 55 characteristics per column, flags 32 kinds of hygiene issue, and generates tests from 34 test types. On SQL Server, Azure SQL, and Synapse, its sample-based data profiling uses the database’s own sampling for large tables, per TestGen’s 2025 release notes.

Open source is free for one user, one connection, and one project. Start at the data profiling install page, or see the open-source data profiling tools compared.

Frequently asked questions

Short answers to the follow-up questions people ask next.

What is the difference between data profiling and data quality testing?

Data profiling describes what the data is today. A data quality test asserts what it must be and fails when it isn't. You profile first so the tests have sensible thresholds, then run the tests on every load. A tool such as DataOps TestGen generates the tests from the profile.

Is data profiling the same as SQL Server Profiler?

No. SQL Server Profiler is Microsoft's tool for tracing server events, such as slow queries and logins, and Microsoft Learn lists it as deprecated in favor of Extended Events. Data profiling reads the contents of tables and describes the values in each column.

How often should you run data profiling?

Once when you first meet a table, again after schema changes or big loads, and on a regular schedule for tables that change shape. Tests and monitors run far more often than data profiling. Data profiling a busy production database is best done on a replica or copy, outside business hours.

Which tools do data profiling?

Open-source options include YData-Profiling, now published as fg-data-profiling, for DataFrames in a notebook, Deequ for Spark, DataCleaner and OpenRefine for interactive work, and DataOps TestGen for every table in a database. Our open-source data profiling tools answer compares them.

Try it on your own data

DataOps TestGen is free and open source. Profile a table and generate its tests this afternoon.