Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
my input is like
id,col1,col2,col3
101,a,b,a
102,a,a,a
103,b,a,b
My output should be like
101,1,a
101,2,b
101,3,a
102,1,a
102,2,a
102,3,a
103,1,b
103,2,a
103,3,b
I have done half part using tnormalize and got the output as
101,a
101,b
101,a
102,a
102,a
102,a
103,b
103,a
103,b
How to get the index count
Hi,
Since you have already normalized data, I am not repeating that part. The output from the normalized data can be passed to a tMap to generate the sequence. Please refer the screen **bleep**s below.
Numeric.sequence(row1.id,1,1)
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
My expected output should be like
101,1,a
101,2,b
101,3,a
102,1,a
102,2,a
102,3,a
103,1,b
103,2,a
103,3,b
If I have 5 columns for an id I should get 5 rows with the values incremented as 1,2,3,4,5and the respective column value
can we do it in tjavarow?
Well, you can call the function in tJavarow although tMap is my personal favourite.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
how to do it in tjava..please help. my id is in bigdecimal
Hi,
You can either use tConvertType component to convert the data type from one to another. If you are expert in java, you can directly use Java data type conversion functions.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved