Manage Connections Enterprise¶
A connection defines how TestGen accesses your data for profiling, testing, and monitoring. TestGen requires only read-only access β see Access Requirements for what each supported source needs. Each project can have multiple connections, and each connection can have multiple table groups.
The open-source version is limited to a single connection. Select Connection from the menu to edit its configuration, then click Setup Table Groups to set up a table group.
Note
Creating, editing, and deleting connections requires the Admin role on the project.
Create a connection¶
The Data Configuration Setup wizard walks you through creating a connection, setting up a table group, and optionally configuring profiling, testing, and monitors.
- Select Connections from the menu.
- Click Add Connection.
- Select the data source, and click Next.
Fill in the connection details¶
- Give the connection a name, unique within the project.
-
Enter the connection details for the type you selected.
Typically a Host, Port, Database, and credentials. For a Docker installation, if the database is running on localhost on the same machine as TestGen, set the Host value to
host.docker.internal.Typically the location of your files and credentials. Test Connection reports how many files it found there.
-
Optional. Expand Advanced Tuning to adjust Max Threads and Max Expression Length. The defaults suit most data sources; see Max Threads before changing Max Threads.
- Optional. Click Test Connection to verify the connection.
- Click Next.
Create a table group¶
- Give the table group a name, unique within the project.
-
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,
%_idand%_sk, match names such ascustomer_idandorder_sk. A column namedid, 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/*.csvfor the CSV files in a folder, orsales/**/*.csvto 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.
-
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
WHEREclause without the keyword, such asregion = 'EMEA'. See Table filters. -
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.
-
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 Comparisongeneration 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.
-
Optional. Expand Table Group Tags to add metadata such as a description, data source, business domain, or stakeholder group.
- 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.
Edit a connection¶
Select Connections from the menu, and click the (edit icon) on the connection you want to modify. Make changes as needed, and click Test Connection to verify before saving.
Delete a connection¶
Warning
Deleting a connection permanently removes the connection and its table groups, with their 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 scorecards created with them. This action cannot be undone.
Select Connections from the menu, and click the (delete icon) on the connection you want to remove. Confirm the deletion.
Reference¶
Max Threads¶
Max Threads sets how many queries TestGen runs against a connection at a time. A new connection starts at the default for its type. You can choose any value from 1 to 16.
| Data source | Default | Recommended range |
|---|---|---|
| Microsoft SQL Server, Azure SQL Database | 2 | 1β4 |
| Amazon Redshift | 2 | 1β4 |
| Oracle | 2 | 1β4 |
| Google BigQuery | 8 | 4β16 |
| DuckDB, Local Files, Amazon S3, Azure Blob Storage | 1, fixed | |
| All others | 4 | 2β8 |
SQL Server and Redshift spread each query across many processor cores, so running several queries at once makes each one slower without finishing the run sooner. Runs on DuckDB connections and file data sources use TestGen's own processor cores, so TestGen runs their queries one at a time.
Related topics¶
- Manage Table Groups β change which tables a table group profiles
- Test Suites β organize the tests for a table group