userguide_2420

Upload: azfar-raza

Post on 26-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Userguide_2420

    1/2

    Name of Solution:

    Informatica Developer : LogDB 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 passstrings 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. TheIntegration 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

  • 7/25/2019 Userguide_2420

    2/2

    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.