Table of Contents

Search

  1. Preface
  2. Introduction to PostgreSQL Connector
  3. Connections for PostgreSQL
  4. Mappings and mapping tasks with PostgreSQL Connector
  5. PostgreSQL objects in mapping tasks
  6. Lookup transformation
  7. SQL transformation
  8. Migrating a mapping
  9. PostgreSQL SQL ELT optimization
  10. Data type reference

PostgreSQL Connector

PostgreSQL Connector

Override the target query

Override the target query

You can configure an override target query to override the update query that the Secure Agent generates for the update operation. To override the update query, select
Update As Update
from the
Update Mode
list in the advanced target properties.
You must specify the override target query with a valid SQL syntax because PostgreSQL Connector does not validate the update query.
Specify the override target query in the following format:
UPDATE <schema name>.<Target table name here> SET <Column1> = :TU.<Column1>, <Column2> = :TU.<Column2>, <ColumnN> = :TU.<ColumnN> WHERE <Upadate Column1> = :TU.<Upadate Column1>
where, :TU. in the update query, that represents the incoming data source for the target port, must match the target table column names and the WHERE clause is mandatory in the query.
If the number of :TU columns are less than the total number of columns in the PostgreSQL target, you must map the required fields to the PostgreSQL target.
When you use the
Override Target Query
property for a PostgreSQL target, consider the following rules:
  • You cannot use the override target query for an insert, upsert, delete, or data driven operation.
  • You cannot change the order of the column mappings using the override target query.
  • You cannot specify multiple override target queries for an update operation.

0 COMMENTS

We’d like to hear from you!