How do you profile, test and monitor data quality in Databricks with TestGen?

DataOps TestGen connects to a Databricks SQL warehouse with read-only Unity Catalog grants, runs profiling and data tests there as SQL, monitors each table's freshness, volume, and schema over time, and publishes data quality scorecards. Map each medallion layer to its own table group. TestGen is Apache 2.0 and free for one database connection.

Key points

  • TestGen needs four Unity Catalog grants on Databricks: USE CATALOG on the catalog, USE SCHEMA on the schema, SELECT on the tables, and CAN USE on the SQL warehouse.
  • TestGen authenticates to Databricks SQL with a personal access token or a service principal's client ID and client secret, per TestGen's access requirements page in October 2026.
  • A TestGen table group is one schema plus include and exclude masks, so a bronze, silver, and gold lakehouse maps to three table groups on one connection.
  • TestGen profiles 55 column characteristics, flags 32 data hygiene issues, generates 34 test types, and offers 19 business-rule and custom SQL test types, all run as SQL on your SQL warehouse.
  • Every TestGen query runs on your Databricks compute, so profiling cost shows up as SQL warehouse time; TestGen's docs recommend profiling biweekly to monthly and testing daily to weekly.

DataOps TestGen connects to Databricks through a SQL warehouse, runs every profiling query and test there as SQL, monitors tables over time, and scores the results. It never writes to your tables. This page is the setup. For how TestGen compares with Databricks’ native features and with Monte Carlo or Anomalo, read the Databricks tool comparison.

Connect

TestGen’s access requirements for Databricks SQL, as of October 2026:

PermissionPurpose
USE CATALOG on the target catalogReach objects in the catalog
USE SCHEMA on the target schemaReach the schema with your tables
SELECT on tables in the schemaProfile, test, and collect monitor metrics
CAN USE on the SQL warehouseRun queries on that compute

Authenticate with a personal access token or a service principal’s client ID and client secret. Use a service principal for anything that runs unattended. Column discovery reads information_schema.columns, which needs no separate grant. These grants are written for Unity Catalog workspaces.

Profile

Profiling collects 55 column characteristics and flags 32 data hygiene issues: type mismatches, unexpected nulls, mixed patterns, suspect dates, and probable PII.

Map the medallion to table groups. A table group is one schema plus include and exclude masks, so bronze, silver, and gold become three table groups on one connection, each with its own suites, monitors, and profiling schedule. DataKitchen’s post on the four points in a medallion architecture where testing matters explains what each layer’s tests are for.

Large Delta tables cost warehouse time. Turn on profile sampling in the table group to estimate pattern and character counts from a sample. Record counts, distinct counts, minimums, maximums, and percentiles always cover the full table.

Test

Generate tests and TestGen picks from 34 test types, sets thresholds from the profile, and fills the suite. You add any of 19 business-rule and custom SQL test types by hand. Every test runs as SQL on the SQL warehouse.

Schedule test runs in TestGen, daily to weekly per the scheduling docs, or trigger them from a Databricks job task through the REST API. The job-task version is a gate: DataKitchen’s tripwire post puts one after bronze-to-silver and another after silver-to-gold, and a failure stops the job before gold is written. That April 2026 post reached TestGen over SSH because the API hadn’t shipped yet. The API now replaces that step, as the Databricks Workflows how-to shows.

Observe

Monitors watch each table between test runs. Freshness compares a hash of key columns to the last run and learns the update schedule. Volume tracks row counts. Schema reports every added, dropped, or retyped column. Metric monitors track a custom value you define. Run them at about twice the rate your tables change.

TestGen watches the tables. DataOps Observability watches the jobs: its Databricks agent monitors Databricks workflows on Azure Databricks, Databricks on AWS, and Databricks on Google Cloud. Export TestGen results to Observability and a failed test sits next to the job run that loaded the table.

Dashboard

Each table group gets a scorecard on the Quality Dashboard. The quality score multiplies a profiling score by a testing score, weighted so an issue on a primary key in a small dimension table can count more than the same issue on a low-cardinality flag in a large fact table. A CDE score covers only columns flagged as critical data elements. Profiling runs also produce a PDF issue report you can send to the owner of a source.

TestGen Quality Dashboard showing a Default scorecard with a total score, a CDE score, profiling and testing sub-scores, and scores by quality dimension

The screenshot shows TestGen’s Quality Dashboard. It is the same on every database TestGen supports.

Walkthrough

These steps follow the Databricks quickstart and the current Manage Connections page.

  1. Install TestGen.
  2. Grant the four permissions above to a service principal or user.
  3. In TestGen, open Connections, click Add Connection, and choose Databricks.
  4. Enter the connection details and credentials, then click Test Connection.
  5. Create a table group: name the schema, set the masks, and click Verify Access.
  6. Leave Run profiling on. Review hygiene issues on the Profiling Runs page.
  7. Leave Generate and schedule tests on, name the suite, and set a schedule.
  8. Configure monitors and set their schedule.
  9. Open the Quality Dashboard.

TestGen and Databricks’ native features

Databricks nativeDataOps TestGen
Freshness and volumeAnomaly detection, schema-wideFreshness, volume, schema, and metric monitors
Column statisticsData profiling (formerly Lakehouse Monitoring)55 characteristics plus 32 hygiene detectors
Value rulesCHECK and NOT NULL constraints, Lakeflow expectations you write34 generated test types plus 19 business-rule types
Where it runsServerless computeYour SQL warehouse
Cost basisServerless DBUsSQL warehouse time; free open source, or Enterprise per user and connection

Native sources: data quality monitoring, constraints, and expectations, checked October 21, 2026. Use both: constraints block bad writes, and TestGen covers the columns nobody wrote a rule for. DataKitchen’s post on medallion test coverage counts how many that is.

Pricing

The core profiling, testing, and monitoring engine is free and open source. Enterprise adds team access, security, Commercial Pharma tests, source-data controls for AI, and support. Open source covers one user, one database connection, and one project, with unlimited tables. Enterprise is $100 per user per month plus $100 per database connection per month. Databricks is one of 14 databases TestGen supports, on the same pricing.

Documentation: Databricks quickstart, Connect your data, Access requirements, Manage connections, Manage table groups, Monitor tables, Quality scores, Run profiling and tests, Observability Databricks agent.

Frequently asked questions

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

Does any data leave my environment?

No. TestGen runs profiling and tests as SQL on your Databricks SQL warehouse, and TestGen itself runs on your own infrastructure. Only results and metadata are stored in TestGen's application database, including the most frequent values and minimum and maximum text values that profiling keeps for display in the Data Catalog. TestGen never writes to your tables.

Which Databricks compute does TestGen use?

A Databricks SQL warehouse, named in the connection, which needs the CAN USE permission. Every profiling query, test, and monitor runs there, so TestGen's cost to you is SQL warehouse time. Profiling is the heavy job: TestGen's docs recommend running it biweekly to monthly, and profile sampling cuts pattern analysis on very large tables.

Does TestGen work with Delta and Iceberg tables in Databricks?

TestGen doesn't read Delta or Iceberg files itself. It sends SELECT statements through the Databricks SQL warehouse and discovers columns through information_schema, so the tables in scope are the ones your SQL warehouse can query in the schema you name. The TestGen product page lists Apache Iceberg tables among the structured sources it tests through a warehouse.

Can TestGen stop a Databricks job when tests fail?

Yes, from a job task. The task calls the TestGen REST API to start a test run, polls until the job completes, reads the failed count, and exits non-zero when it is above zero. Databricks then skips every downstream task. DataKitchen's tripwire post shows the pattern between bronze-to-silver and silver-to-gold.

Is there a Databricks quickstart for TestGen?

Yes. DataKitchen's Databricks quickstart loads the AdventureWorks sample data into Databricks, connects TestGen, runs profiling, reviews hygiene issues, generates and runs tests, and opens the data quality dashboard. The quickstart was written for an earlier release, so trust the current reference pages for the counts: 55 profiling characteristics and 32 hygiene issue types.

Try it on your own data

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