I have tried expression transformation so far along with aggregate transformation to get the maximum value of the sequence number.Source is flat file
标签:
informatica
相关问题
- Can ETL informatica Big Data edition (not the clou
- INFORMATICA - Date format conversion
- PowerCenter REG_EXTRACT issue
- How to get max of a column in informatica?
- Reprocess tabular cubes after failure using Inform
相关文章
- 的PowerCenter REG_EXTRACT问题(PowerCenter REG_EXTRACT
- 的Informatica - CONCATENATE 1列的所有行的单个值(Informatic
- 对Informatica的的PowerCenter SQL Server存储库(SQL Server
- Informatica的的PowerCenter VS定制的Perl ETL作业?(informat
- 快照太旧错误(Snapshot too old error)
- INFORMATICA - Date format conversion
- PowerCenter REG_EXTRACT issue
- How to get max of a column in informatica?
The way you are designing would require reading the source twice in the mapping, one to get the total number of records (max sequence as you called it) and then another one to read the detail records and pass them to target1 or target2.
You can simplify it by passing the number of records as a mapping parameter.
Either way, to decide when to route to a target - you can count the number of records read by keeping a running total in a variable port, incrementing every time a row passes thru the expression and checking against the (record count)/2.
If you can, write a Unix (assuming your platform is Unix) shell script to do a head of the first file with half the file size in lines (use wc of the file with the right param as the param to head after dividing it by 2) and direct the output to a 3rd file. Then do a tail on the second file also using wc as just described and >> the output to the 3rd file you created. These would be pre-session commands. You'd use that 3rd file as the source file for your session. It'd look something like this (untested, but it gets the general idea across):
prior to writing to the target you keep counts in an expression. then connect this expression to a router. The router should have 2 groups
group1 count1 <= n/2 then route it to Target1 group2 count1 > n/2 then route it to Target2
Or
MOD(nextval/2) will send alternative records to alternative targets. I guess it won't send first half to 1st target and 2nd half to 2nd target.
If you don't really care about first half and second half and all you need is two output files equal in size, you can: