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

Answers were Sorted based on User's Feedback



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

Answer / koti

seq -----------cg------------seq

Take input file like
1
2
3
4
5
6
7
8
9
10

comming to CG

Column Method =Explicit
column Generate = Test

go to cg Porperties output ----Mapping----- map the test column----ok

next ,column---edit column meta data--columnname test--sqltype integer----parallel properties---genartor-
type=cycle,increment =1,intial vlue=1.

go to target file do link sort to outputfile

go to apt_config file
check how many node is their

if it 2 nodes
you just create one more node that means total 3nodes.


while runing a job run on 3 nodes.

you will get output like
1
1
1
2
2
2
3
3
3
4

Is This Answer Correct ?    5 Yes 0 No

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

Answer / 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

More Data Stage Interview Questions

what is mapping lookup

1 Answers  


Highlight the main features of datastage?

0 Answers  


Hai..,This Kiran . how to immlement SCD's through sequential file.please explain briefly.if nt ask me i will explain ,what i know.

2 Answers  


what is the main differences between Lookup, Join and Merge stages?

9 Answers   HCL,


How to remove blank spaces from data?

3 Answers  






if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

1 Answers   IBM,


Can you explain kafka connector?

0 Answers  


What are the different common services in datastage?

0 Answers  


What is quality stage?

0 Answers  


How can we run same job in 1 day 2 times

4 Answers   IBM,


Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?

0 Answers   HCL,


Explain the ChangeApply stage?

11 Answers  


Categories