How to convert rows into columns and column into rows in abinitio

I have a scenario:
Input file
Col1 col2
1 A
2 B
3 C
4 D
and desired output should be like below:
col1 1 2 3 4
col2 A B C D
Could you please help

Showing Answers 1 - 4 of 4 Answers

Harpreet

  • Nov 28th, 2015
 

Use a rollup and key as {}
take two variables and temp.var1=string_concat(temp.var1, in.field1);
temp.var2 = string_concat(temp.var2, in.field2);
finally rollup will output these two variables
out.field1 :: temp.field1

  Was this answer useful?  Yes

Keerthi

  • Dec 4th, 2015
 

Use meta pivot component

  Was this answer useful?  Yes

ravichcv85

  • Dec 23rd, 2015
 

By Using "meta pivot component" - we can change the input data into
col1 1
col2 A
col1 2
col2 B
col1 3
col2 C
In order to get the desired output -
col1 1 2 3 4
col2 A B C D
we need feed the output of "META PIVOT" component to De-normalize component.

  Was this answer useful?  Yes

Kanimozhi

  • Nov 18th, 2021
 

Col1 col2
A 1
B 2
C 3

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions