0% found this document useful (0 votes)
56 views2 pages

Name of Solution

This document describes a sample Informatica mapping that uses an SQL transformation to dynamically generate SQL statements and log any database errors. The mapping takes input data, executes dynamic SQL queries to insert records, and logs any errors to a file. It demonstrates how to create dynamic SQL queries where the statement and data can change for each input row using string substitution of parameters.

Uploaded by

Azfar Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views2 pages

Name of Solution

This document describes a sample Informatica mapping that uses an SQL transformation to dynamically generate SQL statements and log any database errors. The mapping takes input data, executes dynamic SQL queries to insert records, and logs any errors to a file. It demonstrates how to create dynamic SQL queries where the statement and data can change for each input row using string substitution of parameters.

Uploaded by

Azfar Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Name of Solution:

Informatica Developer : Log DB Error using SQLT

Business Requirement:
This is a sample Informatica developer mapping that exemplifies use of SQL Transformation
to generate SQL Statements dynamically and log the Database errors if occurs.

Solution URL:
https://community.informatica.com/solutions/2420

Description:
The SQL transformation processes SQL queries midstream in a pipeline. You can insert,
delete, update, and retrieve rows from a database. When an SQL transformation runs in
query mode, it executes an SQL query that you define in the transformation. You pass
strings or parameters to the query from the transformation input ports to change the query
statement or the query data.
When you configure the SQL transformation to run in query mode, you create an active
transformation. The transformation can return multiple rows for each input row. You can
create the following types of SQL queries in the SQL transformation:

Static SQL query: The query statement does not change, but you can use query
parameters to change the data. The Integration Service prepares the query once and
runs the query for all input rows.

Dynamic SQL query. You can change the query statements and the data. The
Integration Service prepares a query for each input row.

A dynamic SQL query can execute different query statements for each input row. When you
create a dynamic SQL query, you use string substitution to define string parameters in the
query and link them to input ports in the transformation. The given mapping example
demonstrates the same.

Download file contents:

Mapping
Source Files

Steps to implement the solution:


1. Import mapping xml to the repository; select the appropriate folder from repository.
2. Run the DB Script provided with this folder to create the target table.
3. Copy the source file cost1.dat into
< Informatica Server > \bin\source.
4. Open mapping in Informatica Developer, check the SQL transformation properties,

5. Validate and Run the Mapping.


6. Run the mapping for second time and check the error log file.

You might also like