I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in the output

Answers were Sorted based on User's Feedback



I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / subbuchamala

SeqFile---->Tranfrmr----->TGT
in Seq file we can add 'ROW NUMBER COlumn' as ROW_NUM which will numbers to each row.
we add 2 parameters to the job: RowNum1, RowNum2
in transformer, in the constrain we can specify below condition:
ROW_NUM<>RowNum1 OR ROW_NUM<>RowNum2
then we can skip those two records.

Is This Answer Correct ?    11 Yes 0 No

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / subhash (subbuchamala)

If we use @INROWNUM, then we have to run transformer on 'single' NODE.

Is This Answer Correct ?    8 Yes 0 No

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / ankit gosain

Hi,

You can block any specified record(s) from the source seq.
file with the help of a Transformer Stage.

Source Seq. File ----> Transformer ---->Target Seq. File

Now, in Transformer stage create a Stage Variable (say
row_num) & initialize it with ZERO.
In it's derivation, just increment it by ONE (i.e.
row_num+1)

Now, Insert a new column in the output & it's derivation,
assign the variable (row_num).

Now, in the contraint tab wirte row_num<>10 OR row_num<>11

If you have some other doubts or queries, you can mail me
on ankitgosain@gmail.com

Cheers,
Ankit :)

Is This Answer Correct ?    2 Yes 1 No

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / srinivas

We can do it by using filter option in sequencial file by using sed command
sed '10d;11d' filename then you will get required output

Is This Answer Correct ?    1 Yes 0 No

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / sushil

SeqFile---->Tranfrmr----->TGT
To number of rows in a sequential file in Transformer we
can use @INROWNUM, store value in variable ROW_NUM and then
by providing condition as same condition as:
ROW_NUM = '10' and ROW_NUM = '11' we can skip such records.

Is This Answer Correct ?    0 Yes 0 No

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in th..

Answer / sharath

Yes Mr Ankit Gosian Answer is correct. But What if numbers
are 1 4 7 9 10 11 13 and so on then.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

Wat is pre-load in Hashed file

1 Answers   Patni,


Difference between sequential file and data set?

0 Answers  


In one project how many shared containers are created?

3 Answers   NTT Data,


i WANTED TO USE THE RANGE LOOKUP SCENARIO IN DATASTAGE 7.5.2 SRVER JOB.i HAVE A DATE FIELD IN SOURCE AND I SHOULD MATCH IT WITH A FIELD IN LOOKUP FILE.BUT,THE FIELDS SHOULD MATCH EVEN THOUGH THERE IS SOME RANGE.CAN SOMEONE TELL ME HOW CAN I DO THAT. THANKS

0 Answers  


You enter values in a schema file for RCP and you also entered values in sequential file? which one will it take?

1 Answers   TIAA CREF,






Hi, My source is oracle(eno,ename,sal,commision,...), my requirement is like this, if there is a null values in commission col i want to keep it as null,and for the remaining first two characters of the value in my target. Plz help me

1 Answers  


How can one find bugs in job sequence?

0 Answers  


how to delete one row in target dataset

0 Answers   Satyam,


Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 reddy could u please help in this Thanks in advance.

6 Answers   Teradata,


i 10 jobs first two jobs are runing in 2nodes,next 2 jobs are running in 4 nodes, next 4 jobs are running in 6 nodes and the remaining jobs are running on 10 nodes. how to change the node configuration?

2 Answers  


I have a few records just I want to store data in to targets cycling way how?

0 Answers   Polaris,


In which situations we can use normal and sparse lookup stages

4 Answers   IBM,


Categories