In the source seq file have 2 columns, i.e
input:
col1,col2
1,1
2,rajesh
3,15000
4,2
5,suresh
6,16000
7,3
8,veeru
9,17000
I want in the output like:
eno,ename,sal
1,rajesh,15000
2,suresh,16000
3,veeru,17000
any one answer this scenario
Answer Posted / bharath
if inputlnk.col1%3= 1 then outputlnk.col1=inputlnk.col2
else inputlnk.col2
if inputlnk.col1%3= 2 then outputlnk.col2=inputlnk.col2
else inputlnk.col2
if inputlnk.col1%3= 0 then outputlnk.col3=inputlnk.col2
else inputlnk.col2
use above conditions in transformer stage
and then
change the column names using modify stage
as col1 = eno
col2 = ename
col3 = sal
let me know right answer, if i'm wrong...
..
Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
How a server job can be converted to a parallel job?
Could anyone give brief explanation bout datastage admin
Whats difference betweeen operational data stage (ods) and data warehouse?
What are the stages in datastage?
table actions available in oracle connector?
Why do we use link partitioner and link collector in datastage?
How many areas for files does datastage have?
How can we improve performance of data stage jobs?
what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?
Which algorithm you used for your hashfile?
what is the difference between == and eq in UNIX shell scripting?
1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)
What are the repository tables in datastage?
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
Explaine the implimentation of scd's in ds indetail, please send me step by step procedure to perform scd's 1,2,3. Please replay for this, Thanks in advance