Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I create calculate dim that extract the data from the word 'Language' till the comma after it.
The calculate : subfield(subfield(EMAIL_SUBJECT,'Language ',2),',',1)
For example:
DATA |
asddsfdsf,Email Language English,try1,try2,Email |
Email Language English,sfsdfds,g,gh |
For both rows I received the word "English".
The problem is that I received the result only when I calculate this in expression but when I moved the calculate to the script I didn't received results:
Load subfield(subfield(EMAIL_SUBJECT,'Language ',2),',',1) AS EMAIL_LANGUAGE
Resident t1
Could you please advise?
Thanks!!
Hi Ruti,
It seems a problem with commas in your data.
For an Inline table, you can quote your data and then split with subfield.
LOAD DATA, subfield(subfield(DATA,'Language ',2),',',1) as DATA_CLEANSED INLINE [
DATA
"asddsfdsf,Email Language English,try1,try2,Email"
"Email Language English,sfsdfds,g,gh"
];
For other data sources, it depends on the source; but as I mentioned it seems to relate with commas in your data.
I can confirm you that this is not an issue with subfield(). The issue would be with your script, it could be wrong field reference, ....just try to investigate and you would get it.
Hi Ruti,
It seems a problem with commas in your data.
For an Inline table, you can quote your data and then split with subfield.
LOAD DATA, subfield(subfield(DATA,'Language ',2),',',1) as DATA_CLEANSED INLINE [
DATA
"asddsfdsf,Email Language English,try1,try2,Email"
"Email Language English,sfsdfds,g,gh"
];
For other data sources, it depends on the source; but as I mentioned it seems to relate with commas in your data.