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



If there is a file that contains 1000 records, I need the ouput to contain these 1000 records with t..

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

If there is a file that contains 1000 records, I need the ouput to contain these 1000 records with t..

Answer / datastage4you

Can you let us know what you have tried?

www.datagenx.net
http://goo.gl/atN4AT

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Data Stage Interview Questions

Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

0 Answers  


What is the use of datastage designer?

0 Answers  


What is quality stage?

0 Answers  


Explain the situation where you have applied SCD in your project?

0 Answers  


how to validate the jobs

2 Answers   IBM,






What is the command line function to import and export the ds jobs?

0 Answers  


explain how to create SCD-2 IN DATASTAGE 7.5X2 PLZ EXPLAIN WITH 4 OR 5 RECORDS TAKE IT EXAMPLE AND JOB DESINGN URGENT

3 Answers   IBM, Polaris,


What is the surrogate key? what is the use of surrogate key? how to Create surrogate key Generator in scd2 in 8.5?

5 Answers   SLK Software,


What is use Array size in datastage

0 Answers  


Can aggregator and transformer stages use to sort the data? How ?

2 Answers  


Demonstrate experience in maintaining quality process standards?

0 Answers   iGate,


Define ds designer?

0 Answers  


Categories