Thankyou for using Microsoft Q&A platform and thanks for posting your query.
As I understand your query, you want to combine multiple columns into single column based on aggregation on Key column here. Please let me know if my understanding is incorrect.
You can try the following approach to achieve the above requirement:
1. Create a dataset pointing to the source file . I have stored the above provided source data in .csv file . Make sure to select Edit option in Column delimiter and provide Space ' ' in the textbox as your column is not separated by comma delimiter. Also, check first row as header.
Data looks like this :
2. Use Aggregate transformation and group by using 'Keys' column and use collect(Row1) in the expression of aggregate tab.
3. Use Derived column transformation to create Columns named - 'Row1','Row2','Row3','Row4','Row5'
4. Use Select Transformation to select only necessary columns
5. Use Sink transformation to load the data in csv. Check the first row as header option.
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators