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 - 24 of 24 Answers

Anil

  • Jul 25th, 2015
 

You can use metapivot component.

  Was this answer useful?  Yes

Arpit jain

  • Apr 6th, 2016
 

Use normalize component. Use multistage transform. You can do this by using rollup also by using string function in it.

  Was this answer useful?  Yes

mohankrishna

  • Apr 8th, 2016
 

Use a Rollup with blank key i.e {} which rolls up the all records to single record and use string_concat function in expanded transform function and you have the output as required. If col1 and col2 are the column names and are not part of the data you can use meta pivot after rollup to assign the fields

  Was this answer useful?  Yes

mohankrishna

  • Apr 8th, 2016
 

After Rollup we need to normalize the vector (length=legth_of(rollup op vector record)

  Was this answer useful?  Yes

Prakash Poongavanam

  • Sep 18th, 2016
 

Use expaqnded rollup with temp variables to get colA and ColB values then in finalize concat with any delimiter to get a single record. 1234,abcd-->o/p

Use normalize function to convert the single record into 2 records
1234
abcd

  Was this answer useful?  Yes

N Gopinath

  • Sep 23rd, 2016
 

Rollup with Accumulation()(function)

  Was this answer useful?  Yes

Jyotiprasad

  • Aug 12th, 2017
 

Use meta pivot or nomalize component

  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