Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a certain data set that I want to transpose.
Input:
Company | vege.label | vege.price | meat.label | meat.price
A | tomatoes | 3 | beef | 5
B | tomatoes | 2 | beef | 10
C | tomatoes | 3 | beef | 8
Output:
Company | tomatoes | beef
A | 3 | 5
B | 2 | 10
C | 3 | 8
Thanks in advance!
Hey! You try Generic Load, but in reality in depends on your source data.
If you want one table using loop Concatenate them
T1:
Load * inline [
Company,vege.label,vege.price,meat.label,meat.price
A,tomatoes,3,beef,5
B,tomatoes ,2, beef,10
C,tomatoes,3,beef,8
];
T2:
generic
Load
Company,vege.label,vege.price
Resident T1;
T3:
generic
Load
Company,meat.label,meat.price
Resident T1;
drop table T1;
Hey! You try Generic Load, but in reality in depends on your source data.
If you want one table using loop Concatenate them
T1:
Load * inline [
Company,vege.label,vege.price,meat.label,meat.price
A,tomatoes,3,beef,5
B,tomatoes ,2, beef,10
C,tomatoes,3,beef,8
];
T2:
generic
Load
Company,vege.label,vege.price
Resident T1;
T3:
generic
Load
Company,meat.label,meat.price
Resident T1;
drop table T1;
Got it. Thanks!