Informatica: Write data into multiple files based

2019-06-03 22:00发布

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

2条回答
forever°为你锁心
2楼-- · 2019-06-03 22:42

You can also do this using post shell command:

Output file --> Name of output file of Informatica.
$2 --> assume 2nd field is the statement. Replace it as per your file

    awk -F\| '{print>$2}' outputfile
查看更多
Bombasti
3楼-- · 2019-06-03 22:45

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.

查看更多
登录 后发表回答