input like
2 7 8
9 5 1
7 3 6

output:2 5 6 how to find out this plz explain?

Answers were Sorted based on User's Feedback



input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?..

Answer / deepanshu

supposing single column is there having values
278
951
736

sol'n :
Use transformer string function with @inrownum variable.

inputcolumn[@inrownum,1]
will give you desired o/p

Is This Answer Correct ?    0 Yes 0 No

input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?..

Answer / bhavani

we can acheive this using transformer stage:
1. Check the record count using AGGREGTOR stage and have a column count
2. In the transformer initiate a loop with condition @ITERATION <=count. and loopvar = @iteration
3.if @INROWNUM = loopvar then right(left(@iteration),1) --> output value

Now the result will be 2
5
6

Let me know if this is correct.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

what is meant by port ? what is the use of port ? what are the different type of ports and its usage

2 Answers   Accenture,


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 we perform 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

1 Answers   Infosys, TCS,


Hi I am Vijay In my source i've 10 records in a single column.... but i want to split those records into 5 sequential files each seq file contains 2 records.?.... can any body help me?

15 Answers   Scope International,


If you want to use a same piece of code in different jobs, how will you achieve this?

0 Answers  






Explain the importance of surrogate key in data warehousing?

0 Answers  


when we will use connected Lookup & Unconnected Lookup

3 Answers   Wipro,


What are the functionalities of link partitioner?

0 Answers  


What is container and then types?

1 Answers  


What r the existing server jobs in parallalism?

0 Answers   ITC Infotech,


how to closeing records after 10,000 records come?

3 Answers  


What is data partitioning?

0 Answers  


Categories