Configure PostgreSQL in a copy activity

This article outlines how to use the copy activity in data pipelines to copy data from PostgreSQL.

Supported configuration

For the configuration of each tab under copy activity, go to the following sections respectively.

General

Refer to the General settings guidance to configure the General settings tab.

Source

Go to Source tab to configure your copy activity source. See the following content for the detailed configuration.

Screenshot showing source tab and the list of properties.

The following three properties are required:

  • Data store type: Select External.
  • Connection: Select a PostgreSQL connection from the connection list. If no connection exists, then create a new PostgreSQL connection by selecting New.
  • Connection type: Select PostgreSQL.
  • Use query: Select from Table or Query.
    • If you select Table:

      • Table: Specify the name of the table to read data. Select the table from the drop-down list or select Edit to manually enter it.

        Screenshot showing Use query - Table.

    • If you select Query:

      • Query: Specify the custom SQL query to read data.

        Screenshot showing Use query - Query.

        Note

        Schema and table names are case-sensitive. Enclose them in "" (double quotes) in the query.

Under Advanced, you can specify the following fields:

  • Additional columns: Add additional data columns to store source files' relative path or static value. Expression is supported for the latter.

Mapping

For Mapping tab configuration, see Configure your mappings under mapping tab.

Settings

For Settings tab configuration, go to Configure your other settings under settings tab.

Table summary

The following table contains more information about the copy activity in PostgreSQL.

Source information

Name Description Value Required JSON script property
Data store type Your data store type. External Yes /
Connection Your connection to the source data store. < your PostgreSQL connection > Yes connection
Connection type Your source connection type. PostgreSQL Yes /
Use query The way to read data. Apply Table to read data from the specified table or apply Query to read data using SQL queries. Table
Query
Yes • typeProperties (under typeProperties -> source)
  - schema
  - table
• query
Additional columns Add additional data columns to store source files' relative path or static value. Expression is supported for the latter. • Name
• Value
No additionalColumns:
• name
• value