Before you start
- Use a read-only account. Create a database role that can only
SELECTthe tables you plan to register. Every query runs as this role and sees everything it can read. For PostgreSQL, the role setup in Query a database from code works as is. - Allow the host. The analytics service connects only to hosts on the deployment’s allowlist. A deployment administrator manages it under Admin -> Data Source Hosts.
- Make it reachable. The database must be reachable from the DataGen analytics service over the network (public endpoint, VPN, peering, or the same private network for on-prem deployments).
Add a connection
1
Open Connections
Go to Data -> Connections and click Connect source.
2
Choose the source type
Pick PostgreSQL, MySQL / MariaDB, Oracle Database or Parquet / S3
under Source type. (Workspace files is covered in
Build analytic models.)
3
Name it
Enter a Connection name. Database connections also get a SQL alias, the
middle part of every source’s SQL name (
data.<alias>.<schema>.<table>). It
defaults to the name, uses lowercase letters, digits and underscores, must be unique
in the workspace, and cannot change later.4
Fill in the fields
Use the fields for your provider (see the tabs below) and choose a TLS mode.
5
Save
Click Save connection. DataGen connects with the credentials before saving: a
wrong host, port or password fails here with the database’s error message.
Fields by provider
- PostgreSQL
- MySQL / MariaDB
- Oracle Database
- Parquet / S3
Choose tables
A new connection has no sources yet. Click Manage tables on the connection card to open the table picker.1
Find the tables
DataGen lists the tables the account can see in the configured schemas. Filter by
name with Search tables… and by Schema. Each row shows the SQL name the
table will get.
2
Select
Tick tables one by one, or Select all matching. You can save up to 100 tables at
a time.
3
Save
Click Save table selection. Selected tables appear as sources under
Datasets -> Sources and under the connection’s name.
PostgreSQL, MySQL and Oracle connections can be used by Native SQL models without
registering any tables. See Build analytic models.
Browse the catalog
Datasets is the workspace catalog. The left side groups it by All datasets, Sources, Analytic models and by connection; the search box matches names and descriptions. Open a source to see:- Data: a preview of up to 500 rows, 50 per page, read live from the database.
- Schema: the columns and their types, a Data source description, and a description per column. Descriptions are saved in DataGen and shown to the Data Builder and to agents.
Keep a connection up to date
How connection credentials are stored
Connection credentials (usernames, passwords, access keys) are encrypted and stored with the connection in DataGen. They are not entries in a Connection Vault, they are never returned to the browser, and they are never placed in an agent’s sandbox:- The analytics service uses them to read sources when it previews, publishes or refreshes a model.
- Agents read published snapshots only, so they need no database credential at all.
- The Data Builder agent queries PostgreSQL sources through DataGen’s SQL proxy (on deployments that run one), which holds the credentials; other sources are queried by the analytics service on the agent’s behalf.
Next
Build analytic models
Turn sources into a published, documented model.
Data overview
Revisit the lifecycle, SQL names, roles and limits.