Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In my source data I have field which contains values separated by comma is there any chance to do the list from such value?
Example:
I Have:
GROUP_1 | AFRICA, EUROPE |
GROUP_2 | ASIA |
GROUP_3 | EUROPE, ASIA |
I need to have:
GROUP_1 | AFRICA |
GROUP_1 | EUROPE |
GROUP_2 | ASIA |
GROUP_3 | EUROPE |
GROUP_3 | ASIA |
yes you can use Subfield
Load Filed1, subfield(Field2,',') as Field2
from source table...
yes you can use Subfield
Load Filed1, subfield(Field2,',') as Field2
from source table...
yes its possible , use the subfield function
subfield(field_name,',') as new_field
Sample for your requirement:
Table:
LOAD Group,
SubField(Country, ', ') as Country;
LOAD * Inline [
Group|Country
GROUP_1|AFRICA, EUROPE
GROUP_2|ASIA
GROUP_3|EUROPE, ASIA
] (delimiter is |);
try this
LOAD Group,
subfield(Country,',') as Country
From Table
Yes, with the SubField() function. It will split a field based on a delimiter.
If the field is called REGIONS use:
SubField(REGIONS,',') As REGION
This will create 2 records for the value AFRICA, EUROPE with AFRICA and EUROPE in new field REGION