Search code examples
informaticainformatica-powercenter

Informatica: Write data into multiple files based on State name


I have table with a column called State. My requirement is to read data from the table and write it into multiple files based on State name. I'm using Informatica PowerCenter as ETL tool


Solution

  • Create a mapping as below:

    Source --> SQ (sort data state name)--> Expression --> Transaction Control --> Target
    

    Expression: Create a variable port to store previous value of state and a output port flag.

    flag = IIF(state = var_state,0,1)
    var_state = state
    

    In Transaction Control Transformation, use TC_COMMIT_BEFORE when Flag = 1

    Add Filename port to Target and map state name as filename.