Use a PostgreSQL database for synthetic data
To use a PostgreSQL database as a source for original data as well as a destination to deliver synthetic data, you need to create PostgreSQL connectors.
For each PostgreSQL data source or destination, you need a separate connector.
Prerequisites
To create a PostgreSQL connector, you need the PostgreSQL database connection details.
- Host
- Port
- Database credentials
- Database name
To use an SSL connection, you need the following files:
- Root certificate (
.crt
) - Client certificate (
.crt
) - Client private key (
.key
)
Create a new PostgreSQL connector from the Connectors page.
Steps
- From the Connectors page, select PostgreSQL under the Connect your data header.
- On the New connector modal, configure the connector.
Field | Description |
---|---|
Name | Enter a name that you can distinguish from other connectors. |
Access type | Select whether you want to use the connector as a source or destination. |
Host | The PostgreSQL database hostname. |
Port | The database port. The default port for PostgreSQL databases is 5432. |
Username | The PostgreSQL database username. |
Password | The PostgreSQL database password. |
Database | The name of the database. |
- To use an encrypted connection to the database, select Use SSL.
- For Root certificate, upload your server root certificate.
- For SSL certificate, upload your client certificate.
- For SSL certificate key, upload your client private key.
- Click Save to save your new PostgreSQL connector.
- MOSTLY AI tests the connection. If you see an error, check the connection details, update them, and click Save again.
- You can click Save anyway to save the connector and disregard any errors.
- MOSTLY AI tests the connection. If you see an error, check the connection details, update them, and click Save again.
What’s next
Depending on whether you created a source or a destination connector, you can use the connector as:
- Data source for a new generator
- Data destination for a new synthetic dataset