Skip to content

Manage Table Groups

A table group is a set of tables that TestGen profiles and tests together. Each table group belongs to a connection and can have its own test suites, monitors, and profiling schedule.

Tip

You can also create a table group as part of the Add Connection wizard, which walks through connection setup and table group creation in one flow.

Prerequisites

  • A connection is required. Use an existing connection or create a new one from the Connections page.
  • Decide which tables you want to profile. On a database connection, take note of the schema name and any specific tables to include or exclude. On a file connection, take note of the paths to the files, relative to the connection's base path.

Tip

For very large or heterogeneous tables β€” hundreds of millions to billions of rows, or a mix of different record types β€” define the table group around homogeneous subsets, such as a product category or a recent time window, rather than the full table. Select each subset with a view, or with a table filter in the table group. This improves both profiling performance and the quality of the generated tests. See Work with large datasets.

Create a table group

  1. Select Table Groups from the menu.
  2. Click Add Table Group.

Fill in the table group details

  1. Give the table group a name, unique within the project.
  2. Choose the tables to profile. This works differently depending on the type of connection.

    In Schema, enter the name of the schema that includes the tables you want to profile. On a Salesforce Data 360 connection, enter the name of the data space in Data Space.

    Use the Tables to Include Mask, Tables to Exclude Mask, and Explicit Table List fields to specify which tables within the schema should be profiled.

    • All three fields take table names, separated by commas or newlines.
    • In the two mask fields, % matches any run of characters, including none. Every other character, including _, matches itself. \_ also matches _.
    • When you fill in more than one field, a table must pass each of them. It must be in the Explicit Table List, match a pattern in the include mask, and match no pattern in the exclude mask.
    • To profile all but a few tables, set the include mask to % and add those tables to the exclude mask.
    • Matching is case-sensitive on most databases, so enter each name in the case the database stores it. Snowflake, Oracle, and SAP HANA store a name created without quotes in upper case.

    Use the Profiling ID Column Mask and Profiling Surrogate Key Column Mask fields to specify which columns hold IDs and surrogate keys. Each takes one column name pattern, matched like the table masks but not case-sensitive. The defaults, %_id and %_sk, match names such as customer_id and order_sk. A column named id, in any letter case, is also profiled as an ID while Profiling ID Column Mask is set.

    In the Tables section, name each table you want to profile and the files it reads. Click Add Table, then fill in the row.

    • Name β€” the name for this table in TestGen. Use letters, numbers, and underscores only, and give each table a different name.
    • File or Pattern β€” the path, relative to the location set on the connection. Name a single file (sales/orders.csv), or a pattern to read every file that matches it: sales/*.csv for the CSV files in a folder, or sales/**/*.csv to include its subfolders. A pattern is one table whose rows span every file it matches, so to profile each file separately, declare one table per file.
    • Format β€” CSV, Parquet, or JSON. See File formats and column types.

    For a CSV table, click (CSV settings icon) to set the Delimiter, whether the file Has header, and the Quote and Escape characters. TestGen detects each of these automatically when you leave it blank.

    Repeat for each table you want to profile.

  3. Optional. Expand Table Filters to read only some of a table's records, such as one region or a recent time window. Click Add Filter, then enter the Table and a Filter Condition written like a SQL WHERE clause without the keyword, such as region = 'EMEA'. See Table filters.

  4. Optional. Expand Sampling Parameters to toggle on Use profile sampling, then assign a sample percent and minimum count.

    • Sampling applies to pattern and character analysis, such as letter case, embedded spaces, standard formats, and frequent patterns, and to the list of frequent values. TestGen estimates these counts from a sample.
    • Record counts, distinct values, minimums, maximums, average lengths and values, and percentiles always cover the full table, or the records that match its table filter.
    • The sample percent sets the share of each table's records to analyze, and the minimum count sets the smallest sample size.
    • Test types that need exact counts, such as Value Match and Pattern Match, are not generated on text columns profiled from a sample.
    • For exact pattern, character, and frequent value counts, run profiling without sampling.
  5. Optional. Expand Settings to review these options.

    • Detect critical data elements (CDE) during profiling β€” Automatically flags columns as Critical Data Elements based on profiling patterns. Enabled by default.
    • Detect PII during profiling β€” Automatically flags columns that match patterns for personally identifiable information (such as SSNs, credit card numbers, and email addresses). Enabled by default.
    • Exclude XDE columns from profiling β€” Skips columns marked as Excluded Data Elements during profiling, reducing noise and processing time. Enabled by default.
    • Profile for table comparison β€” Collects hashes of each column's values during profiling, which the hash tests of the Table Comparison generation set need. Adds profiling time. Not shown for SAP HANA and Salesforce Data 360 connections. Disabled by default.
    • Include table group in Project Dashboard β€” Controls visibility in the Project Dashboard. Enabled by default.
    • Add scorecard for table group β€” Controls visibility in the Quality Dashboard. Enabled by default.
    • Min Profiling Age (in days) β€” The age of the profiling results that test generation uses. The default is 0, which uses the most recent results. Tests generated from the most recent results are expected to pass.
  6. Optional. Expand Table Group Tags to add metadata such as a description, data source, business domain, or stakeholder group.

  7. Click Next.

Verify table access

The wizard previews the tables it found for the table group, and highlights each table whose filter condition is not valid. Optionally, click Verify Access to confirm that TestGen can query the tables.

On a file connection, you can expand each declared table to see the columns TestGen inferred and their types.

Click Next to continue.

Run profiling

  • To profile the table group immediately after creation, leave Run profiling toggled on.
  • To skip profiling and run it at a later time, toggle off Run profiling. You can run profiling later from the Table Groups page.

Click Next to continue.

Set up testing

You can optionally create a test suite and schedule automated test runs as part of the setup.

  • To generate tests and schedule test runs, leave Generate and schedule tests toggled on. Enter a Test Suite Name that no other test suite in the project uses, set a Test Run Schedule, and select a Timezone.
  • To skip this step, toggle off Generate and schedule tests. You can create a test suite later from the Test Suites page.

Note

Tests are auto-generated after profiling completes and then run on the schedule you configure. See Recommended frequency for guidance.

Click Next to continue.

Set up monitors

You can optionally configure monitors for the table group as part of the setup.

  • To configure monitors, leave Configure monitors toggled on. Set the Monitor Schedule, Timezone, and optionally adjust the Sensitivity and other prediction model settings.
  • To skip this step, toggle off Configure monitors. You can configure monitors later from the Monitors page.

Note

Volume and Schema monitors are created immediately. Freshness monitors are created after the first profiling run completes. See Configure Monitors for details on monitor settings.

Click Finish Setup to complete the setup.

What happens after setup

When Run profiling is on, profiling runs in the background after the wizard completes. Once profiling finishes, tests are auto-generated and monitors begin tracking your tables. Explore results in the Data Catalog.

Edit a table group

Select Table Groups from the menu, and click the (edit icon) on the table group you want to modify. Make changes as needed in the dialog, and verify table access before saving.

When you rename a table group, the scorecard created with it takes the new name too, unless you have renamed that scorecard or changed its filters.

After you change a table filter, run profiling again and regenerate the table group's tests. Regeneration does not change locked or manually created tests, so review their thresholds and baselines against the records that the new filter selects.

Change the schema of a table group

When your pipeline loads each new version of the data into a schema with a different name, change the table group's schema instead of creating a new table group. The tests keep their history, so trends and predicted thresholds carry over.

  1. Select Table Groups from the menu, and click the (edit icon) on the table group.
  2. In Schema, enter the new schema.
  3. Click Next, and confirm that the list includes every table the table group tests.
  4. Click Save.

Profiling, test generation, monitors, and test runs all read the new schema. Referential tests keep reading their second table from the schema they name. TestGen refuses the change when it cannot read the schema, when no table in it matches the table group's Tables to Include Mask, Tables to Exclude Mask, and Explicit Table List, when the condition of a table filter is not valid on its table in the new schema, or while a job for the table group, such as profiling or a test run, is in progress.

Warning

If the new schema does not have a table, that table's tests report an error on each test run until the table is back. When the test suite has Automatically deactivate tests that fail validation selected, the first test run deactivates them instead. See Tests that fail validation. The next monitor run deletes the table's monitors, along with the thresholds they learned.

Delete a table group

Warning

Deleting a table group permanently removes its profiling runs and hygiene issues, test suites, test runs and results, monitors, data catalog entries, schema change history, schedules, job history, notification rules, and the scorecard created with it. This action cannot be undone.

  1. Select Table Groups from the menu.
  2. Click the (delete icon) on the table group you want to remove.
  3. Confirm the deletion.

TestGen does not delete a table group while a profiling run, test generation, test run, or monitor run for it is queued or running, or while its data catalog refresh is running. A queued data catalog refresh is canceled. Wait for the job to finish, or cancel it, and try again.

If you have renamed the scorecard created with the table group or changed that scorecard's filters, it stays on the Quality Dashboard, along with any other scorecard that filters on the table group. Edit or delete them there.

Reference

File formats and column types

On a file connection, TestGen reads each declared table as the format you select, so the format has to match what the files hold. A JSON file read as CSV produces a table of meaningless columns rather than an error. The preview at Verify table access is where you catch that.

A CSV or JSON file carries values rather than declared types, so TestGen infers each column's type from the values it finds. A text column whose values are all digits is read as a number, and a column with no values at all is read as text. Parquet carries its own types, so use Parquet where the exact type matters.

Where one table spans several files, TestGen reads the union of their columns, so a column that appears in only some of the files is still included.

Table filters

A table filter limits a table to the records that TestGen reads, without creating a view in your database. Use one to keep data quality checks on the records you are responsible for, to leave out test or archived records, or to keep queries on very large tables fast.

A table filter applies to the queries TestGen runs against the table's records for profiling, test runs, and monitors, and a test's Record Subset Condition narrows the filtered records further. When a test also reads a second table, such as the reference table of Reference Match, that table's own filter applies if the table is in the same table group.

A table filter does not apply to Custom Test and SQL Metric tests, whose query decides which records they read, or to checks of the table's structure: Schema monitors, and the Schema Conformance, Match Column Count, and Match Column Type tests.

Each filter names a table in the table group, in the letter case the database stores the name in.

Adding, changing, or removing a table's filter changes the records its monitors read. On their next run, the table's Volume and Metric monitors can flag the new values as anomalies, and its Freshness monitor sees the change as an update.

Tables that appear or disappear at the source

TestGen profiles the tables that a table group resolves to at the time of the run. Where a table group names its tables explicitly β€” through Explicit Table List on a database connection, or through declared tables on a file connection β€” a table added at the source is not profiled until you add it to the table group, and a table that is no longer there is recorded as dropped.