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

Create a Redshift user with USAGE on your schema and SELECT on its tables, and add it to DataOps TestGen as an Amazon Redshift connection. TestGen then profiles every column, generates tests from the profile, runs them as SQL inside Redshift, monitors freshness, volume, and schema, and scores the results. It's Apache 2.0, free for one connection.

Key points

  • DataOps TestGen connects to Amazon Redshift with a username and password and needs USAGE on the target schema, SELECT on its tables, and SELECT on information_schema.columns, per DataKitchen's Access Requirements page.
  • TestGen tests Redshift Spectrum external tables with USAGE on the external schema and SELECT on its tables, discovering columns through svv_external_columns; approximate row counts are not available for external tables.
  • TestGen profiles 55 characteristics per column, runs 32 data hygiene detectors, and generates tests from 34 test types, all as read-only SQL inside Redshift.
  • TestGen's documentation recommends profiling every two weeks to a month and running tests daily to weekly, scheduled after your Redshift loads finish.
  • Redshift enforces NOT NULL but treats primary key, unique, and foreign key constraints as informational, so TestGen's uniqueness and referential tests check what Redshift declares and doesn't enforce.

TestGen connects to Amazon Redshift as a database, with no agent inside the cluster. If you’re still choosing a tool, start with the best tool for Redshift. Running Aurora PostgreSQL too? It has its own page.

Connect: a read-only user

TestGen authenticates to Redshift with a username and password. Per the Access Requirements page, it needs:

GrantWhy
USAGE on the target schemaReach the tables
SELECT on tables in the schemaProfile, test, and collect monitor metrics
SELECT on information_schema.columnsDiscover tables, columns, and types
SELECT on pg_catalog.pg_namespace, pg_classApproximate row counts, visible to every user by default

For Spectrum, grant USAGE on the external schema and SELECT on its tables. TestGen discovers those columns through svv_external_columns.

CREATE USER testgen_reader PASSWORD '<strong password>';
GRANT USAGE ON SCHEMA analytics TO testgen_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA analytics TO testgen_reader;

TestGen never runs INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP. Keep the user read-only anyway, because a custom test runs SQL you write.

Profile: every column, as SQL in Redshift

Profiling records 55 characteristics per column and runs 32 hygiene detectors: numbers stored as text, unexpected dates, PII in a “clean” table. Two Redshift details matter. TestGen reads approximate row counts from pg_class to plan its queries, and that shortcut doesn’t exist for Spectrum tables. And profile sampling applies only to pattern and character analysis and the list of frequent values. Record counts, distinct counts, minimums, maximums, and percentiles always cover the full table.

Profiling is the heavy job. The scheduling guide recommends it every two weeks to a month. On a provisioned cluster, add TestGen’s user to a user group and route that group to its own WLM queue. On Redshift Serverless, every query bills per second with a 60-second minimum, Spectrum queries included.

Test: generated first, business rules second

TestGen generates tests from 34 test types using the profile, then runs them as SQL in Redshift. Uniqueness and referential tests matter more here than elsewhere: Redshift doesn’t enforce primary, unique, or foreign keys, but the planner assumes they hold. Add your own rules from 19 business-rule and custom SQL test types. Lock a tuned test so regeneration leaves it alone.

Schedule tests daily to weekly, after your loads finish, or trigger them from the pipeline through the REST API. The CI/CD answer has a working script.

Observe: freshness, volume, schema

Monitors watch tables over time. Volume and schema monitors start when you configure them. Freshness monitors follow the first profile, because profiling picks the key columns they fingerprint. Add metric monitors for numbers you track yourself. Anomalies reach you by email, Slack, Microsoft Teams, or webhook through notifications.

TestGen watches the tables. DataOps Observability watches the jobs that fill them. TestGen exports test results to it, and its Amazon S3 agent covers files landing before a COPY. There is no Observability agent for Redshift itself.

Dashboard: one score per table group

Each table group gets a scorecard on the Quality Dashboard. The score multiplies a profiling score by a testing score, weighted so a bad key on a dimension table counts more than a bad flag on a fact table. A separate CDE score covers only critical data elements.

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

The screenshot is TestGen’s demo project, not a Redshift database. The layout is the same for every source.

Walkthrough: Redshift in about ten minutes

DataKitchen’s AWS Redshift quickstart loads AdventureWorks into Redshift and runs these steps:

  1. Install TestGen.
  2. Open Connections, click Add Connection, and pick Amazon Redshift.
  3. Enter a name, host, database, user, and password. Click Test Connection.
  4. Create a table group: the schema and the tables to include. Preview the tables to confirm access.
  5. Run profiling, then review hygiene issues and the Data Catalog.
  6. Create a test suite, generate tests, and run them.
  7. Open the Quality Dashboard.

Newer releases add setup wizard steps for scheduling tests and monitors. The quickstart’s feature counts predate them; the numbers on this page are current.

TestGen vs Redshift’s native features

JobRedshift nativeTestGen
Unique and primary keysDeclared, not enforcedUniqueness tests on every run
Foreign keysDeclared, not enforcedReferential tests
NOT NULLEnforced at loadNull-rate tests and hygiene checks on every column
ProfilingNot built in55 characteristics per column
Freshness, volume, schemaNot built inMonitors with notifications
Quality scoreNot built inScorecards with CDE score

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.

TestGen reads Redshift and 13 other databases, which also makes it a check on a migration into or out of Redshift. For the wider vendor field, see DataKitchen’s count of data quality vendors, and for Spectrum, the Iceberg release post.

Documentation: AWS Redshift quickstart, Connect your Data, Access Requirements, Manage Connections, Manage Table Groups, Manage Test Suites, Scheduling, Monitor Tables, Quality Scores, Run Profiling and Tests

Frequently asked questions

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

What permissions does TestGen need in Redshift?

Read access only. Grant the TestGen user USAGE on each target schema, SELECT on the tables in it, and SELECT on information_schema.columns. TestGen also reads pg_catalog.pg_namespace and pg_catalog.pg_class for approximate row counts, which every Redshift user can see by default. For Spectrum, grant USAGE on the external schema and SELECT on its tables.

Does any data leave my environment?

No. TestGen runs profiling and tests as SQL inside Redshift, and only results and metadata are stored in TestGen's own database, including the most frequent values and minimum and maximum text values that profiling keeps for display in the Data Catalog. TestGen runs on your infrastructure, never copies rows out for testing, and never runs INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP against Redshift.

Does TestGen support IAM authentication for Redshift?

Not as of October 2026. DataKitchen's Access Requirements page lists username and password as the authentication method for Amazon Redshift and Redshift Spectrum. Create a dedicated database user for TestGen with read-only grants, and store its password only in the TestGen connection. Azure, Databricks, and OneLake connections are the ones that support service principals.

How much Redshift compute does TestGen use?

It depends on table size and schedule, because every profile and test is a query on your Redshift. Record counts, distinct counts, minimums, maximums, and percentiles always scan the full table; profile sampling cuts the pattern and character analysis. On Redshift Serverless, each query bills compute per second with a 60-second minimum. On provisioned clusters, give TestGen its own WLM queue.

Should I use TestGen or AWS Glue Data Quality on Redshift?

Use TestGen when you want tests generated from a profile of every column and run as SQL in Redshift, with monitors and scorecards in one place. Use Glue Data Quality when your tables already live in the Glue Data Catalog and you want rules written in DQDL, ML anomaly detection, and pay-per-DPU-hour billing. They can run side by side.

Try it on your own data

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