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

souce file having the columns like name company krish IBM pooja TCS nandini WIPRO krish IBM pooja TCS if first row will be repeat i want the result like this name company count krish IBM 1 pooja TCS 1 nandini WIPRO 1 krish IBM 2 pooja TCS 2

9 Answers  


Highlight the main features of datastage?

0 Answers  


how many dimentions and fact tables used in your project and what are names of it?

3 Answers   Tech Mahindra,


What is the default padding character?

3 Answers   IBM,


Hi any one has datasatge 8.5 certication dump could you please provide your details i will contact you. send reply to my mail rajaadivi@gmail.com Thanks in Advance

2 Answers  






What is the difference between validate and compile?

1 Answers   CTS,


i have input like this Column 1 ,column 2 3,a 4,b 5.c i want output  aaa bbbb ccccc Ple help any one?

4 Answers   SLK Software,


How we can covert server job to a parallel job?

0 Answers  


one file contains col1 100 200 300 400 500 100 300 600 300 from this i want to retrive the only duplicate like this tr1 100 100 300 300 300 how it's possible in datastage?can any one plz explain clearley..........?

8 Answers   IBM,


Difference in the implementation of lookup and join stages,in joining two tables?

7 Answers   TCS,


What is RCP?

2 Answers   TCS,


I have 5 different sources i want same records in 5 different targets Can you any body send me this question answer rathdsetl@gmail.com

2 Answers   TCS,


Categories