hi this is kiran
i have one table i want divide the table with two different
table like even rows and odd rows
how can i do this one
tell me plzz
Answers were Sorted based on User's Feedback
Answer / eswar
oracle stage--->surrogate key generator--->transformer
the t/f having 'mod' function
mod(empkey,2)=0 --->even rows
mod(empkey,2)<>0 --->odd rows
empkey is generated from surrogate key generator
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / farzana kalluri
Hi we can achive like this
Source--->Transformer---->filter--->2 targets
Transformer--->1.constraints--->mod(input,2)=0
2.constraint---->mod(input,2)=1
From this we can get the odd numbers in one target and
even numbers in one target...
| Is This Answer Correct ? | 2 Yes | 0 No |
sourc->transformer->filter->two targets
in the transformer stage we have append new column and
derviation area write mod(@outrownum,2) (where @outrownum in
sysvarible)
after that we put fileter or switch in that
write condition on append column 0 then even records
1 then go odd records
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nish
You could also go for a column generator and cycle the values 1,0.
then filter based on this column.
It will be much faster then employing a transformer stage having to generate @rownum and then do a mod calculation.
Trying to reduce the number of transformer stages is a key efficiency best practice.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between SQl Loader and OCI in datastage?
in sequtial file 2 columns avaliable, i want only one column load the target. for this we can do by modify and copy stage. But here when using modify stage (in property drop column1) until it is ok. if target is data set How to view the data. with out using data management. what is the reason for this. if any body know this answer plz tel me. thanks.
I have 3 jobs A,B and C , which are dependent each other. I want to run A & C jobs daily and B job run only on sunday. how can we do it?
I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4 ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000 DATE-- COLUMN. I WANT TO DISPLAY THE DATA PREVIOUS MONTH HIGEST SAL ?
If there is a file that contains 1000 records, I need the ouput to contain these 1000 records with the header as file name concatenated with the current timestamp and trailer as the count of records
Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?
How can we do null handling in sequential files
How do you load 10 different sources with 10 different layouts to 10 different tables?
To see hidden files in LINIX?
at source level i have 40 columns,i want only 20 cols at target what r the various ways to get it
HOW CAN WE SEE THE DATA IN DATASET?
How complex jobs are implemented in datstage to improve performance?