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

What are stage variables, derivations and constants?

0 Answers  


What is the importance of the exception activity in datastage?

0 Answers  


How to clean the datastage repository?

0 Answers  


1.What is the flow of Transformer? 2.How can you do INDEX table in DataStage level?

0 Answers   EDS,


How do you register plug-ins?

0 Answers  






What is merge stage?

0 Answers  


when we have to go for a sequential file stage & for a dataset in datastage?

1 Answers  


What is job control?

0 Answers  


I have a few records just I want to store each records tow times in target how?

2 Answers   Polaris,


What is configuration your file structure 2)I have two databases both are Oracle while loading data from source to target the job takes 30 min but I want to load less time how?

1 Answers   Hexaware,


how may datastage variables/parameters will be in trnsformer stage? 1 2 3 4 ?

1 Answers   Wipro,


my soure table is emp having columns sal,deptno in the deptno 10,20,30deptno row are there expected out put is min(sal) of 10th deptno,max(sal) of 20th deptno,mean(sal) of 30th deptno using aggregation stage

4 Answers  


Categories