Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following problem:
Data source:
Key | Field A |
50|18052594|632000|11,91 | 3211 |
50|18052594|632000|11,91 | 3219 |
50|18052594|632000|11,91 | 3329 |
50|18052594|632000|11,91 | 4100 |
50|18052594|632000|11,91 |
4201 |
50|18052594|632002|11,91 |
4201 |
... |
|
I need to transform this data in the load script to this:
Key | Field A |
50|18052594|632000|11,91 | 3211, 3219, 3329, 4100, 4201 |
50|18052594|632002|11,91 | 4201 |
... |
Is there a way to do this? Thanks in advance.
Hi,
you can try Concat() with a group by
tabl1:
Load
concat(field2,',') as filed3,
field1
group by field1;
Load * inline [
field1,field2
50|18052594|632000|11|91,3211
50|18052594|632000|11|91,3219
50|18052594|632000|11|91,3329
50|18052594|632000|11|91,4100
50|18052594|632000|11|91,4201
50|18052594|632002|11|91,4201
];
Keep in mind that in my script for the inline not to create a new column for me, i changed ",91" to "|91"
in your case you will not have to do it.
Hope it helps,
Hi,
you can try Concat() with a group by
tabl1:
Load
concat(field2,',') as filed3,
field1
group by field1;
Load * inline [
field1,field2
50|18052594|632000|11|91,3211
50|18052594|632000|11|91,3219
50|18052594|632000|11|91,3329
50|18052594|632000|11|91,4100
50|18052594|632000|11|91,4201
50|18052594|632002|11|91,4201
];
Keep in mind that in my script for the inline not to create a new column for me, i changed ",91" to "|91"
in your case you will not have to do it.
Hope it helps,
Thanks, my idea would have been more complicated.