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
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 |
Answer / subhash (subbuchamala)
If we use @INROWNUM, then we have to run transformer on 'single' NODE.
| Is This Answer Correct ? | 8 Yes | 0 No |
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 |
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 |
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 |
What is a ds designer?
there are two schemas x and y are there. some data is in x schema. i want to use that in y schema..how can i use? please give some possibilities
Give example for FACTLESS FACT TABLE in real-time scenario.
is it possible to access the same job by two users at a time in DataStage?
What is a merge in datastage?
Differentiate between odbc and drs stage?
How many types of sorting methods are available in datastage?
how does work server jobs?
how can we join one oracle & flat files ?
EXPLAIN SCD
I am having the 2 source files A and B and I want to get the output as, the data which is in file A and which doesn't in file B to a target 1 and which is in file B and which doesn't in file A to a target 2?
col1 123 abc 234 def jkl 768 opq 567 789 but i want two targetss target1 contains only numeric values and target2 contains only alphabet values like trg1 123 234 768 567 789 trg2 abc def jkl opq