简体   繁体   English

如何基于列值在Informatica中生成动态目标​​文件

[英]How To Generate Dynamic Target File In Informatica Based On Column Value

Scenario: Generate different flat file target based on the Location name, like separate files for Mumbai.dat, Bangalore.dat, and Delhi.dat 场景:根据位置名称生成不同的平面文件目标,例如Mumbai.dat,Bangalore.dat和Delhi.dat的单独文件

Source file: Dept name Dept ID Location DWH 1 Mumbai Java 2 Bangalore Dot net 3 Delhi 源文件:部门名称部门ID位置DWH 1孟买Java 2班加罗尔点网3德里

I am able to achieve it by transaction control component and output file target field but the problem is I am trying to create workflow and in session associated to this mapping I want to pass input file and output file as parameters that will populate through parameter file but I am getting error in reading input file however when I hard code the path with filename it's reading that perfectly.Apart from this output file is getting created with zero byte and not dynamically when I am trying to pass parameters for that.Can someone please help with workflow parameter file and how to use it in this case? 我能够通过事务控制组件和输出文件目标字段来实现它,但是问题是我正在尝试创建工作流,并且在与此映射相关联的会话中,我想将输入文件和输出文件作为将通过参数文件填充的参数进行传递,但是我在读取输入文件时遇到错误,但是当我用文件名对路径进行硬编码时,它读取的却是完美的。除此输出文件之外,该文件是使用零字节创建的,而当我尝试传递该参数时不是动态创建的。有人可以帮忙吗工作流参数文件,在这种情况下如何使用?

Edit your target file definition and tick to include a FileName port. 编辑您的目标文件定义,然后勾选以包含FileName端口。 Then its normal mapping logic to pass the desired filename through to this port. 然后使用其常规映射逻辑将所需的文件名传递到此端口。 Informatica will send the record to file with name as specified by the port Informatica会将记录发送到端口指定名称的文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM