My input has a unique column-id with the values 10,20,30.....how can i get first record in one o/p file,last record in another o/p file and rest of the records in 3rd o/p file?

Answer Posted / kumar

As you have a single text file as Source. Use folloowing
approach to get the desired output.

Head1 Target1

Seq. File Copy Tail2 Target2

Head3 Tail Target3
Steps:
1.> Read your source file using sequential file stage.
2.> Pass the records to copy stage and take 3 output link.
3.> 1 to Head stage head1, 2nd to Head2 and 3rd to Head3.
4.> In the 1st Head Stage Head1, in the properties specify
1, it will pick up the 1st record and make that record to
target 1.

5.> Similarly, to capture last record in target2, in Tail
stage property mention 1. It will take last record and pass
it to target2.

6.> To load rest records 1st using head stage, capture top
records say, if u have 10 records in the source pick top 9
records using head stage then use tail stage followed by
head stage and mention 8, it will pick all records except
1st one. then u can load these to target3.

If u get confused ask me ....

Thanks
Kumar

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement complex jobs in data stage?

619


how to export or import the jobs in .ISX file

721


in oracle target stage when we use load option and when we use upsert option?

1756


What is usage analysis in datastage?

820


Which commands are used to import and export the datastage jobs?

985






What is the difference between validated and compiled in the datastage?

705


Terminate Activity

841


How many Key we can define in remove duplicate stage?

822


How can we improve performance of data stage jobs?

618


Why we use surrogate key?

701


What is apt_config in datastage?

705


8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?

1786


Can you explain link buffering?

728


What is the difference between server job and parallel jobs?

674


How many types of hash files are there?

613