If there is a file that contains 1000 records, I need the ouput to contain these 1000 records with the header as file name concatenated with the current timestamp and trailer as the count of records
Answers were Sorted based on User's Feedback
Answer / raj
Method 1:
In Order to get this , the file name has to be parameterized.
Row Generator ->
Source -> Column Generator -> Funnel -> Destination
Aggregator ->
Column Generator:
Create column named 'Count' starting with 1 and incrementing by 1. By this, the last row will have the value of1000 in the 'Count' column.
Aggregator:
Get max of count which is 1000.
We also pass the actual data through another link.
Aggregator count is passed into funnel which is the trailer count.
The three inputs
1. File name concatenated with timestamp is passed from row generator.
2. Actual data is passed directly after column generator.
3. Header count is passed through the third link.
are joined in a funnel stage.
As funnel needs same number of columns across all the input we set all other columns as NULL.
Method 2...
This is an easy method using after job sub routine.
After the job is complete run a after job sub routine to get record count from any link and append to the file
Similar operation could be done for the header record.
Is This Answer Correct ? | 0 Yes | 0 No |
Can you let us know what you have tried?
www.datagenx.net
http://goo.gl/atN4AT
Is This Answer Correct ? | 0 Yes | 1 No |
Why we use parameters instead of hard code in datastage.
Difference between data warehousing and olap?
Hai..,This is Kiran M. What is D/B Change Capture stage and Difference stage?
How to convert alpha Numeric values to alpha using functions?
What is the difference b/w Hash file and Lookup Fileset stages?
how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?
how to capture rejected data by using join stage not for lookup stage. please let me know
How to get max salary of an organization using data stage stages........... can any body help me plz.......
Describe stream connector?
how to handle null values in sequential file?
Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.
What is the difference between informatica and datastage?