Learn more about PostgreSQL Export Integration.
The Data Connector for PostgreSQL enables you to directly import data from your PostgreSQL to Treasure Data.
For sample workflows showing how to import data from your PostgreSQL, view Treasure Boxes.
Continue to the following topics:
Basic knowledge of Treasure Data
Basic knowledge of PostgreSQL
A PostgreSQL instance running remotely, for example on RDS.
When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and then specify the source information.
Open TD Console.
Navigate to Integrations Hub > Catalog
Search for and select PostgreSQL. Select Create.
The following dialog opens.
Enter the required credentials and set the parameters. Select Continue.
The host information of the source database, such as an IP address.
The connection port on the source instance. The PostgreSQL default is 5432.
Username to connect to the source database.
The password to connect to the source database.
Check this box to connect using SSL
Specify SSL version
Select which SSL version to use for the connection.
Socket connection timeout
Timeout (in seconds) for socket connection (default is 300).
Timeout (in seconds) for network socket operations. 0 means no timeout.
Type a name for your connection. If you would like to share this connection with other users in your organization, select Share with others. If this box is unchecked, then the connection is visible only to you.
After creating the authenticated connection, you are automatically taken to Authentications.
Search for the connection you created.
Select New Source. The Create Source dialog opens.
Type a name for your Source in the Data Transfer field.
Edit the following parameters
The name of the database you are transferring data from. For example, your_database_name.
Use custom SELECT query?
Use if you need more than a simple SELECT (columns) FROM table WHERE (condition).
If there are only specific columns you would like to pull data from, list them here. Otherwise, all columns are transferred.
The table from which you want to import the data.
If you need additional specificity on the data retrieved from the table you can specify it here as part of WHERE clause.
Specify if you need the records ordered by a particular field.
Select Next. The Data Settings page opens.
Optionally, edit the data settings or skip this page of the dialog.
When you want to repeatedly run this transfer, select this checkbox to import data only since the last time the import was run.
Rows per batch
Extremely large datasets can lead to memory issues and subsequently failed jobs. Use this flag to breakdown the import job into batches by the number of rows to reduce the chances of memory issues and failed jobs.
The timezone to be used when doing the import.
This SQL is executed after the SELECT query in the same transaction.
Select this option to modify the type of column before importing it. Select Save to save any data setting you have entered.
Default Column Options
Select this option to define the data type according to default SQL types before importing it. Select Save to save any data settings you have entered.