Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

How a server job can be converted to a parallel job?

0 Answers  


how to run jon in unix back round process what is command use in runing a job?

2 Answers   HSBC,


Can you filter data in hashed file?

0 Answers  


job locking methods? How can we unlock the job?

3 Answers   IBM,


Please tell me What is difference between 8.0 and 8.1

1 Answers   IBM,


How one source columns or rows to be loaded in to two different tables?

0 Answers  


hi All, i have one scenario like if source--->transformer-->2 target sequential files the 1 st target sequential file is loads the data from source and 2nd target sequntial file contain the 1st target total record count,and file name of 1 st target seq file and timestamp seperated by delimeter for example if source have 10 record the 1st target seq file hav 10 records and 2nd target seq file example 10|xyz.txt|20101110 00:00:00 could you please help me out how can i implement in datastage job.

4 Answers   IBM,


Can you explain players in datastage?

0 Answers  


If you want to use a same piece of code in different jobs, how will you achieve this?

0 Answers  


how can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction

1 Answers   Reliance,


what is the diff between sequential file and fileset stages?

3 Answers  


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


Categories