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 to do pergformence tuning in datastage?

4 Answers   MCA, Symphony, TCS,


what is ds administrator used for?

0 Answers  


how do u reduce warnings

1 Answers   CGI,


What is Fastly Changing Dimension?

6 Answers   TCS,


Hi Every one, I have a scenario plz suggest me 1)On daily we r getting some huge files data so all files metadata is same we have to load in to target table how we can load? 2) One column having 10 records at run time we have to send 5th and 6th record to target at run time how we can send? Hi plz help me for above scenarios and If any one is having JobSequence kindly send me one example and the scenario to my mail ID(nrvdwh@gmail.com)

3 Answers   HSBC,


What is the roundrobin collector?

0 Answers  


diff between OLTP and OLAP? what TOP-DOWN and BOTTOM-UP Approach? which is best? what are Star Schema and Snow Flake Schema?

2 Answers   TCS,


Display all files which have size more 3KB in given directory/folder.

1 Answers   TCS,


What is confirmed Dimension? what is Factless Fact? give one example? What are Additive, Semi-Additive Facts?

1 Answers   TCS,


if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names separated by commas in another columns how can we do?

5 Answers  


What is the Main difference between Lookup Failure and Lookup Not Met? Plz explain with Example.

2 Answers  


HOW WILL YOU IMPLEMENT SURROGATE KEY IN SCD BY USING SURR_KEY GENERATOR,THE VALUE OF S_KEY SHOULD NOT REPEAT EVEN IF THE JOB IS COMPILED REPEATEDELY?

4 Answers   L&T,


Categories