how can we generate row values like
1
1
1
2
2
2
3
3
3
using col generator
plz let me know

Answer Posted / peeyush sehgal

Take input file like 0 1 2 3 4 5 6 7 8 9
seq -> trans -> seq

in transformer, clear its partitioning and sort the data.
then in stage variable
initialize sv=1

if inputlink%3=0 then sv+1 else sv

populate sv in output column.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you run datastage job from the command line?

596


What is aggtorec restructure operator?

722


How and where you used hash file?

655


Name the command line functions to import and export the DS jobs?

705


Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...

3756






Difference between sequential file and data set?

641


how do u catch bad rows from OCI stage? And what CLI stands for?

2281


1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)

2309


What is job control?

622


What is meta stage?

577


Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how

1118


How to read multiple files using a single datastage job if files have the same metadata?

737


Explaine the implimentation of scd's in ds indetail, please send me step by step procedure to perform scd's 1,2,3. Please replay for this, Thanks in advance

1745


What are the types of jobs we have in datastage?

668


Difference between ‘validated ok’ and ‘compiled’ in data stage?

668