【发布时间】:2018-10-09 19:18:54
【问题描述】:
我有一个表,其中有一列名为 State。我的要求是从表中读取数据并根据州名将其写入多个文件。我使用 Informatica PowerCenter 作为 ETL 工具
【问题讨论】:
标签: informatica informatica-powercenter
我有一个表,其中有一列名为 State。我的要求是从表中读取数据并根据州名将其写入多个文件。我使用 Informatica PowerCenter 作为 ETL 工具
【问题讨论】:
标签: informatica informatica-powercenter
如下创建映射:
Source --> SQ (sort data state name)--> Expression --> Transaction Control --> Target
表达式:创建一个变量端口来存储之前的状态值和一个输出端口标志。
flag = IIF(state = var_state,0,1)
var_state = state
在事务控制转换中,当 Flag = 1 时使用 TC_COMMIT_BEFORE
将文件名端口添加到目标并将状态名称映射为文件名。
【讨论】:
您也可以使用 post shell 命令执行此操作:
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
【讨论】: