Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello expert, i have a file like this table
Object | attribute | value |
Ball | color | red |
diameter | 10 cm | |
height | 100 cm | |
Box | color | black |
length | 20 cm | |
height | 16 cm |
table that i want
Object | attribute | value |
Ball | color | red |
Ball | diameter | 10 cm |
Ball | height | 100 cm |
Box | color | black |
Box | length | 20 cm |
Box | height | 16 cm |
How am i supposed to do that?
Please Suggest.
thanks
Try like this
if(len(trim(Object))=0,Previous(Object),Object) as Object
Please, do as follow:
Table:
load if(len(trim(Object))>0,RowNo(), peek('Flag')) as Flag , Object,attribute, value Inline [
Object, attribute, value
Ball, color, red
,diameter, 10 cm
,height, 100 cm
Box ,color, black
,length, 20 cm
,height ,16 cm
];
Mapping:
Mapping load Flag,Object Resident Table;
Final:
load ApplyMap('Mapping',Flag) as Object,
attribute,
value
Resident Table;
drop Field Flag;
drop Table Table;
Result: