Use a PostgreSQL database for synthetic data

MOSTLY AI can use a PostgreSQL database as a source for original data as well as a destination to deliver synthetic data. To do so, you need to create PostgreSQL connectors.

For each PostgreSQL data source or destination, you need a separate connector.

Prerequisites

Obtain the connection details for your PostgreSQL database.

  • 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)

If you use the web application, create a new PostgreSQL connector from the Connectors page.

Steps

  1. From the Connectors tab, click Create connector. Click Create connector button
  2. From the Create a new connector window, select PostgreSQL. Select MySQL connector
  3. From the New connector window, configure the connector.
    1. For Name, enter a name that you can distinguish from other connectors.
    2. For Access type, select whether you want to use the connector as a source or destination.
    3. For Host, enter the database hostname.
    4. For Port, enter the database port.

      The default port for PostgreSQL databases is 5432.

    5. For Username and Password, enter your PostgreSQL database credentials.
    6. For Database, enter the name of the database. Configure PostgreSQL connector
  4. To use an encrypted connection to the database, select Use SSL.
    1. For Root certificate, upload your server root certificate.
    2. For SSL certificate, upload your client certificate.
    3. For SSL certificate key, upload your client private key. Configure PostgreSQL SSL connection
  5. 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 disregarding any errors.

What's next

Depending on whether you created a source or a destination connector, you can use the connector as: