You can use cross-schema SQL ELT optimization for a mapping task to read from or write data to PostgreSQL objects associated with different schemas within the same PostgreSQL database.
To use cross-schema SQL ELT optimization, create two PostgreSQL ODBC connections and specify the schema in each connection. Ensure that the schema in the source connection is different from the schema in the target connection, but both the schemas must belong to the same database. When you configure SQL ELT optimization for the mapping task, enable cross-schema SQL ELT optimization in the advanced session properties. By default, the check box is selected.
Configuring cross-schema SQL ELT optimization for PostgreSQL mapping
Create two PostgreSQL mappings. For example, perform the following steps to configure cross-schema SQL ELT optimization for a PostgreSQL mapping task:
1Create the following two PostgreSQL ODBC connections, each defined with a different schema:
aCreate an psql_odbc1 PostgreSQL ODBC connection and specify PSQL_SCHEMA1 schema in the connection properties.
bCreate psql_odbc2 PostgreSQL ODBC connection and specify PSQL_SCHEMA2 schema in the connection properties.
2Create a PostgreSQL mapping, m_psql_pdo_acrossSchema. Perform the following tasks:
aAdd a Source transformation and include a PostgreSQL source object and connection psql_odbc1 to read data using PSQL_SCHEMA1.
bAdd a Target transformation and include a PostgreSQL target object and connection psql_odbc2 to write data using PSQL_SCHEMA2.
3Create a PostgreSQL mapping task, and perform the following tasks:
aSelect the configured PostgreSQL mapping, m_psql_pdo_acrossSchema.
bOn the Runtime Options tab, in the SQL ELT Optimization section, set the SQL ELT optimization value to Full.
cIn the Advanced Session Properties section, select the Enable cross-schema SQL ELT optimization check box.
dSave the task and click Finish.
When you run the mapping task, the Secure Agent reads data from the PostgreSQL source object associated with the PSQL_SCHEMA1 schema and writes data to the PostgreSQL target object associated with PSQL_SCHEMA2 schema.