Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

convert columns to rows with no aggregation

Hi
I've got this kind of data table (Excel or csv):

name joe peter Kelly
surname smith warton hartford
age 23 28 34
occupation professor bartender manager

and I want to use the first column as names for my table fields like this:
name surname age occupation
joe smith 23 professor
peter warton 28 bartender
kelly hartford 34 manager
I've used several components but to no avail. Take into account I don't need aggregation whatsoever, just transpose and convert rows to columns using first column as header.

Thanks
Labels (2)
23 Replies
Anonymous
Not applicable

Hi,
Whether your columns in each block are varying? Yes
Whether the order of the column is changing? Yes
How do you plan to arrange the data in the output? Any logical or business suggestion?
Vaibhav
Anonymous
Not applicable

I agree that my solution is not the best, but there has to be some structure to what is coming in. With the possible solution I provided, the names would have to be consistent but the arrangement of data doesn't matter.
As long as it always come in as "Acct-Status-Type = Interim-Update", where it shows up in the file won't matter.
I've used a similar tJavaFlex solution in my own jobs when the order and number of columns varies so greatly that I couldn't create a consistent set of metadata. By using the Java code to find the header row and loop through the header names, I was able to apply an index to each column that I wanted and ignore everything else.
But true, for something like this to work, at least the name of the column, or in your case the structure of the key=value pair, has to be consistent.
Anonymous
Not applicable

Hi I am unable to find tTurnRow on Talend Exchange
Anonymous
Not applicable

Hello @stuti_206

Since the moderation is in place, we have stopped to publish unexpected components in Talend Exchange.

The custom component tTurnRow has been cleaned from Talend Exchange Portal, which is not able to be installed into studio since version 3.1.

Best regards

Sabrina