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 |
when we will use connected Lookup & Unconnected Lookup
A flatfile contains 200 records.I want to load first 50 records at first time running the job,second 50 records at second time running and so on,how u can develop the job?pls give the steps?
Hi frnds, my scenario is like i'm having a record 1234"1323£3434%343434^23232!1212$23232 in the above record all the special characters must be removed.how can we do it in datastage 8.0.1.can any one please ans this? thanx in advance
How to exclude first and last lines while reading data into a sequential file(having some 1000 records).I guess probably by using unix filter option but not sure which to use
HOW CAN WE ABORT THE JOB IF THE RECORDS OF SOURCE FILE CONTAINS VALUE AS 'VIJAY'?
where we use column generator stage in real time scenario?
what is usage of datastage with materialized views
how to find out number of records imported into source file?
What is exact difference between Parallel Jobs and server Jobs..
I have file with empid,empname and I want to load these two fields along with sal in my target 1)salary must be same for all the records 2)I want pass the salary at run time
types of errors in datastage?
I have oracle enterpaise stage, oracle bulkloader stage, ODBC stage and I want to load data in to target, which of the above stages do I need to use and why?