You can configure an SQL transformation in a PostgreSQL mapping to process SQL queries and stored procedures in PostgreSQL.
When you add an SQL transformation to the mapping, on the
SQL
tab, you define the database connection and the type of SQL that the transformation processes.
You can use an SQL transformation to process the following types of SQL statements:
Stored procedure
You can configure an SQL transformation to call a stored procedure in PostgreSQL. The stored procedure must exist in the PostgreSQL database before you create the SQL transformation.
When the SQL transformation processes a stored procedure, it passes input parameters to the stored procedure. The stored procedure returns the values to the output fields of the transformation.
SQL Query
You can configure an SQL transformation to process an entered query that you define in the SQL editor. Do not use more than one SQL query in an SQL transformation.
The SQL transformation processes the query and returns the rows. The SQL transformation also returns any errors that occur from the underlying database or if there is an error in the user syntax.
For more information about SQL queries and stored procedures, see