Skip to main content

Setting Up a destination Connector in AI Squared

To integrate PostgreSQL with AI Squared, you need to establish a destination connector. This connector will enable AI Squared to extract data from your PostgreSQL database efficiently. Below are the steps to set up the destination connector in AI Squared:

Step 1: Access AI Squared

  • Log in to your AI Squared account.
  • Navigate to the destinations section where you can manage your data destinations.

Step 2: Create a New destination Connector

  • Click on the Add destination button.
  • Select PostgreSQL from the list of available destination types.

Step 3: Configure Connection Settings

You’ll need to provide the following details to establish a connection between AI Squared and your PostgreSQL database: Host The hostname or IP address of the server where your PostgreSQL database is hosted. Port The port number on which your PostgreSQL server is listening (default is 5432). Database The name of the database you want to connect to. Schema The schema within your PostgreSQL database you wish to access. Username The username used to access the database. Password The password associated with the username. Enter these details in the respective fields on the connector configuration page and press continue.

Step 4: Test the Connection

  • Once you’ve entered the necessary information. The next step is automated Test Connection feature to ensure that AI Squared can successfully connect to your PostgreSQL database.
  • If the test is successful, you’ll receive a confirmation message. If not, double-check your entered details for any errors.

Step 5: Finalize the destination Connector Setup

  • Save the connector settings to establish the destination connection.

Performance Features

Batch Write Support

The PostgreSQL destination connector supports high-performance batch writes with the following capabilities:
  • Bulk Operations: Writes up to 10,000 records per batch using efficient bulk INSERT and UPSERT operations
  • Automatic Fallback: If a bulk operation fails, the connector automatically falls back to individual record writes to ensure data integrity
  • Connection Management: Database connections are properly closed after each write operation to prevent resource leaks
  • Upsert Support: For update operations, the connector uses PostgreSQL’s ON CONFLICT clause to perform efficient upserts based on primary keys
This batch support significantly improves write performance when syncing large volumes of data to PostgreSQL destinations.

Conclusion

By following these steps, you’ve successfully set up a PostgreSQL destination connector in AI Squared.