Open source data quality for SQL Server
Stop writing SQL Server data quality tests by hand.
Point TestGen at SQL Server, on-prem or in Azure. It profiles every table, generates thousands of tests, and flags hygiene issues on the first run. Read-only access. Free and open source.
Install TestGen
Pick your platform. Free and open source.
# TestGen install for Mac, Linux.
# Download the latest installer.
$ curl -o dk-installer.py \
'https://raw.githubusercontent.com/DataKitchen/data-observability-installer/main/dk-installer.py'
# Run the install command.
$ python3 dk-installer.py tg install
# Full docs: docs.datakitchen.io/testgen/get-started/install-on-mac-linux/ - Double-click
dk-installer.exein your Downloads folder. - If Windows shows a protection warning, choose More info, then Run anyway.
- Pick TestGen, then Docker or pip. The installer seeds demo data, opens the UI, and prints your login.
# Full docs: docs.datakitchen.io/testgen/get-started/install-on-windows/
- 55data profiling column characteristics
- 32data hygiene detectors
- 34test types auto-generated from the profile
- 19business rule and custom SQL test types
Connect TestGen to SQL Server
TestGen runs read-only queries inside your database. It never creates, changes, or deletes anything. A SQL login with SELECT on your schema is all it needs.
- Versions
- SQL Server 2019 and later. Still on SQL Server 2017? Talk to us.
- Sign-in
- SQL Server login (username and password).
- Permissions
- SELECT on the tables you want tested.
information_schemaandsys.partitionsare readable by default, andsys.objectsshows the tables you can already select. - Where TestGen runs
- On a server, VM, or laptop on your network, next to the database. On-prem SQL Server is fine: your data never leaves your environment.
SQL Server data problems TestGen catches
The usual suspects in a SQL Server estate that has grown for a decade. Each card lists the TestGen checks that find it.
-
Dates and numbers stored as text
Legacy VARCHAR columns full of dates and amounts that sort wrong and break joins.
-
Orphans the schema never stopped
Foreign keys created WITH NOCHECK, or never created, leave rows pointing at nothing.
-
A load ran twice, or not at all
An SSIS package or SQL Agent job reran, or silently failed overnight.
-
Placeholders posing as data
“N/A”, “-”, 1900-01-01 and 9999-12-31 where a real value should be.
-
Truncated on the way in
Text and decimals cut short when a column was narrowed or a load mapped to a smaller type.
-
Padding and stray spaces
Fixed-width imports and CHAR columns that make equal values look different.
What TestGen does on SQL Server
Everything below is in the open source release, and all of it works on SQL Server. Enterprise adds team access, security, Commercial Pharma tests, and support.
-
Auto-Generated Tests (documentation, opens in a new tab)
Point TestGen at a SQL Server schema and it writes the tests, then runs them as T-SQL inside the database. No hand-written CHECK queries, no stored procedures to maintain.
-
Data Profiling (documentation, opens in a new tab)
A periodic X-ray of every SQL Server table and column: 55 characteristics per column, including the VARCHAR columns that are really dates or numbers.
-
Hygiene Detection (documentation, opens in a new tab)
Finds what a decade of schema changes left behind: placeholders like 1900-01-01, leading spaces from fixed-width imports, truncated text and mixed types.
-
Anomaly Detection (documentation, opens in a new tab)
Freshness, volume, schema and custom-metric monitors flag a SQL Agent job or SSIS package that ran late, ran twice, or loaded half the rows.
-
Data Catalog (documentation, opens in a new tab)
Every SQL Server table’s profile, hygiene issues, test results, PII flags and Critical Data Elements in one place, without a separate catalog project.
-
Quality Scoring (documentation, opens in a new tab)
Scorecards by data quality dimension and Critical Data Element for each SQL Server table group, ready to feed a Power BI dashboard through the API or Excel export.
-
MCP Server (the TestGen MCP cheat sheet)
Ask Claude, Copilot or Cursor what failed in SQL Server last night and see the rows behind it, through 112 MCP tools that run behind your firewall.
-
Open Source Core, UI Included
Unlimited tables and a full UI. The core data profiling, testing and monitoring engine is free under Apache 2.0, for one SQL Server connection. Enterprise adds more connections, team access, security and support.
From DataKitchen on SQL Server
- Answer
What is the best data quality tool for SQL Server?
The best SQL Server data quality tool profiles every column, generates tests, monitors freshness and volume, and runs read-only inside your own network.
- Answer
How do you test data quality in SQL Server without writing T-SQL by hand?
Generate SQL Server data quality tests from a data profile instead of hand-writing T-SQL checks: what gets generated, what you still write, and how long it takes.
- Answer
Is SQL Server Data Quality Services (DQS) still supported, and what replaces it?
DQS is discontinued in SQL Server 2025 and supported only in SQL Server 2022 and earlier. What that means for your DQS projects, and what to use instead.
- Answer
How do you find duplicate rows and orphaned foreign keys in SQL Server?
T-SQL to find duplicate rows with GROUP BY and ROW_NUMBER, orphaned keys with NOT EXISTS, and untrusted foreign keys in sys.foreign_keys, plus generated checks.
- Answer
How do you add data quality checks after an SSIS package runs?
Add an Execute SQL Task after the data flow that raises an error when checks fail, or call a test tool from an Execute Process Task, so bad loads stop the package.
- Answer
What data quality dashboards should a SQL Server and Power BI team build?
The six types of data quality dashboard mapped onto a SQL Server and Power BI stack: who each is for, what it is built from, and which ones TestGen fills in for you.
Why teams choose TestGen
-
You Don't Have Time to Write Tests. TestGen Does It Automatically.
You're buried in customer requests. You have no time to write tests, let alone innovate. TestGen scans your data and generates the tests and anomaly detectors for you. No coding, no massive YAML configuration.
-
SQL Server data quality usually means hand-written T-SQL checks.
TestGen writes them for you from a profile of every column, then keeps running them on a schedule, so the checks grow with the database instead of falling behind it.
See how TestGen works →
-
Runs inside SQL Server
Tests run as read-only SQL where the data sits. Nothing is copied out, and nothing is written back.
-
Apache 2.0, core engine free
Every detector, every characteristic, and every test type but the 12 Commercial Pharma types. In the open source.
-
Self-hosted
Your data never leaves your environment.
-
Bootstrapped since 2013
Profitable, independent, and not pivoting next quarter.
Open Source with Reasonable Enterprise Pricing
Open source TestGen is free for one user, one project, and one database connection. Enterprise is a flat $100 per month per user and database connection, with unlimited tables and data volume. No per-table tax. A year of enterprise data quality costs roughly one data engineer's monthly salary.
See pricingTestGen versus the competition
Head-to-head comparisons with every major data quality and observability tool. Search for the one you are evaluating.
No vendors match. .
- Bristol Myers Squibb
- Eisai
- Catholic Relief Services
- Progeny Health
- X4
- KOA
- CNH
Questions
Which SQL Server versions does TestGen support?
SQL Server 2019 and later. If you are still on SQL Server 2017, talk to us.
How does TestGen sign in to SQL Server?
With a SQL Server login (username and password) that has SELECT on the tables you want tested. information_schema and sys.partitions are readable by default, so no other grants are needed.
Can TestGen run on-prem, next to SQL Server?
Yes. TestGen is self-hosted: install it on a server, VM or laptop that can reach the database, on Windows, Mac or Linux. Your data never leaves your environment.
Does TestGen change anything in my database?
No. TestGen runs read-only SELECT queries to profile data, run tests and collect monitor metrics. It never runs INSERT, UPDATE, DELETE, CREATE, ALTER or DROP, and it stores only computed results (statistics, scores and test outcomes) in its own application database.
Can TestGen check data that SQL Server constraints don’t enforce?
Yes. Foreign keys created WITH NOCHECK, missing unique constraints and VARCHAR columns that hold dates or numbers are common in older schemas. TestGen’s Reference Match, Unique Values and Character Column with Mostly Date Values checks find the rows the constraints would have stopped.
How do I run TestGen after a nightly SSIS or SQL Agent load?
Schedule test runs in TestGen, or call its CLI or API as the last step of the job so the tests run right after the data lands. Table Freshness and Recency checks also flag a load that never ran.
Is TestGen free?
The open source edition is free under Apache 2.0, for one user, one project and one connection, with every detector and test type except the Commercial Pharma tests. Enterprise is $100 per user per month plus $100 per database connection per month, with no per-table fees. See pricing.
Free book
Not ready to try it out now? Read the free book.
The DataOps Way to Data Quality and Data Observability covers why data quality keeps failing and what to do about it: culture, testing strategy, monitoring, and the seven deadly sins of AI-generated pipelines.
- 620 pages
- 63 chapters
- Updated September 2026
- By Chris Bergh, Chip Bloche, and Gil Benghiat