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...


Hi I am Vijay
In my source i've 10 records in a single column.... but i
want to split those records into 5 sequential files each
seq file contains 2 records.?.... can any body help me?

Answers were Sorted based on User's Feedback



Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / pavan

Using transformer we have a system variable @INROWNUM which
will store the row number of each of the incoming row.
Using this variable in constrants part of the each link we
can split the records.

for more info mail me @ akellapavankumar@gamil.com

Is This Answer Correct ?    12 Yes 1 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / vinod upputuri

Guy's,

This is Simple one. Use the row no column in SEQ_stage to
sequence numbers.

SEQ_STAGE>>>FILTER/SWITCH>>>TARGETS

seq_no are placed in SEQ column.

SO, in filter stage: seq>=0 and Seq<=1 for first target.
seq>=2 and Seq<=3 for Second Target
seq>=4 and Seq<=5 for Third Target
seq>=6 and Seq<=7 for Fourth Target
seq>=8 and Seq<=9 for Last Target

Is This Answer Correct ?    8 Yes 0 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / jagdish

using sample stage u can achieve

Is This Answer Correct ?    4 Yes 0 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / dileep

Hi This is Dileep,

Take one Sequential File, One Copy Stage and Put 5 O/P Links to Sequential Files.

From Sequential File, Map Directly to Copy Stage and to Sequential Stage.

In the target Sequential File, In the "Options", One 'Filter' Option is there. In that... Put the Condition like the below..
1 O/P---- head -2
2 O/P---- head -4| tail -2
3 O/P---- head -6| tail -2
4 O/P---- head -8| tail -2
5 O/P---- tail -2.
Similarly U can achieve this in Datastage by Using the Debug Stages 'Head' and 'Tail'. Precondition is to Run the Job on 'Single Node' or 'Sequentially'.

Is This Answer Correct ?    4 Yes 0 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / kiran

hai vijay..,

source is seq file and take target as seq file
then in target, cilk on target folder option and select
file property for 5 times then run the job.
if u have any doubts pls make a call
Thanks&Regards
Kiran
09393363309

Is This Answer Correct ?    6 Yes 6 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / srinivasan

sort the records and split them in a seq file

Is This Answer Correct ?    1 Yes 1 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / venubabu

Mr vijay

First by using pivot stage 10 records in single column
convert into 10 rows,
Next by using transformer stage send two records to one out
put.similarlly for remaining out puts.

Is This Answer Correct ?    1 Yes 1 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / aniket

i think output is to be used
like...
if record 1 and 2 then output table1;
if record 3 and 4 then output table2;
and so on...

Is This Answer Correct ?    0 Yes 0 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / p.ganesh

HAI THIS IS GANESH

IF SF CONTAINS 10 RECORDS USING SURRAGATE ID
GERNERATOR,TRANSFORMER STAGAE WE CAN SPLIT THE DATA INTO
MULTIPLE TARGERS

SF--SURRAGATE ID GENERATOR--TRANSFORMER--TGT1
--TGT2
--TGT3
--TGT4
--TGT5
IN SURRAGATE ID GENERATOR WE CAN GENERATE THE SID VALUES,NEXT
IN TRANSFORMER STAGE WE CAN CLINK ON CONSTRAINT THEN APPLY
THE EXPRESSION AS
IF MOD(DLLINK.SID,5)=1 THEN 1 ELSE 0,THIS IS FOR TGT1
IF MOD(DSLINK.SID,5)=2 THEN 1 ELSE 0,THIS IS FOR TGT2
IF MOD(DSLINK.SID,5)=3 THEN 1 ELSE 0 ,THIS IS FOR TGT3
IF MOD(DSLIND.SID,5)=4 THEN 1 ELSE 0,THIS IS FOR TGT4
IF MOD(DSLINK.SID,5)=0 THEN 1 ELSE 0,THIS IS FOR TGT5


HERE MOD(DSLINK,SID,NO.OF OUTPUT)=CONDITION
THEN
1,6 TO TGT1
2,7 TO TGT2
3,8 TO TGT3
4,9 TO TGT4
5,10 TO TGT5
IF U HAVE ANY DOUBT PLS CONTACT ME
MOBILE:9538631567

Is This Answer Correct ?    0 Yes 0 No

Hi I am Vijay In my source i've 10 records in a single column.... but i want to split thos..

Answer / nukaraju andala

Hi iam nukaraju,

useing tranformer stage after source can get result.

trf_stage--->in system veriables having @inrownum useing
this

@inrownum=2 in constraint of target1
@inrownum<=4 - @inrownum<=2 in constnt target2
6 - " 4 target3
8 - " 6 target4
@inrownum>10 " target5

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

how to find diff between 2 dates without using Icon... funtions?

1 Answers  


Hi am sundar, i have datas like 00023-1010 00086-1010 00184F2-1010 . . . . SCH-AS-1010 200-0196-039 . . . Now i want the result "SCH-AS" in onee column and "1010" in another column.. Can any one tell the answer...

5 Answers  


in sequtial file 2 columns avaliable,iwant only one column load the target how do it.

10 Answers   Wipro,


how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?

0 Answers   HCL,


what is a force compile

2 Answers   Cap Gemini, IBM,


What are the primary usages of datastage tool?

0 Answers  


how to implement scd2 in datastage 7.5 with lookup stage

0 Answers   TCS,


on how many columns we can perform aggregation in the aggregator stage?

2 Answers   Reliance,


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

0 Answers   Wipro,


how to design the change capture stage in(data stage parallel jobs) type 2

2 Answers   IBM,


Can you explain how could anyone drop the index before loading the data in target in datastage?

0 Answers  


1.which index is follows the dimensions tables?why? 2.what is the use of trigger in job sequence? 3.what is the mean of optimization? 4.what is the job control?when we use it? what is difference bet batch and sequencer? 6.seq--->seq,seq--->copy--->seq which one is best and efficient?

1 Answers  


Categories