Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I create a table mapping from a CSV file :
MAP_REGROUPEMENT_CODE:
mapping LOAD
"Regroupement code",
Code
FROM [lib://AttachedFiles/Regroupement_ICA_CODE.csv]
(txt, codepage is 28591, embedded labels, delimiter is ';', msq);
Then i use table map in a table dimension like this :
ApplyMap('MAP_REGROUPEMENT_CODE',Code,'Code non regroupés') as "Regroupement CODE"
I have this error when i load data in script : Field 'Code' not found
your applymap should be:
ApplyMap('MAP_RGP_CODE',ICA_CODE,'Codes non regroupés') as "Code groupé"
Because your field is called ICA_CODE within D_ACCOUNT_ICA.qvd... you need to use that as your mapping field
[ACCOUNT ICA]:
LOAD ICA_CODE,
ApplyMap('MAP_RGP_CODE', ICA_CODE, 'Codes non regroupés') as "Code groupé"
FROM [$(V_QVD_Lib_Root)/exact_bi/BRUT/$(V_Country_Code)/D_ACCOUNT_ICA/D_ACCOUNT_ICA.qvd](qvd);
EXIT script;
Do you have a field called Code in the table where you are using the ApplyMap script?
Hi,
No i have a field which name "ICA_CODE"
Then use that within ApplyMap
ApplyMap('MAP_REGROUPEMENT_CODE', ICA_CODE, 'Code non regroupés') as "Regroupement CODE"
I changed the name of the CODE column to DEV in my CSV file.
I reloaded this file in my application and I modified my applyMap this way:
ApplyMap('MAP_REGROUPEMENT_CODE',DEV,'Code non regroupés') as "Regroupement CODE"
I get the error that comes up: Field 'DEV' not found
Hi,
You should use lookup column as second parameter from your base table, not the mapping table.
MAP_REGROUPEMENT_CODE is then name of my table map
DEV is the column contain differents code
REGROUPEMENT CODE is my key.
Can you share the complete script you are using here?
Yes ,
That is my table mapping (in file xlsx)
[MAP_RGP_CODE]:
mapping LOAD
Regroupement,
Code
FROM [lib://AttachedFiles/Regroupement_ICA_CODE.xlsx]
(ooxml, embedded labels, table is Regroupement_ICA_CODE);
[ACCOUNT ICA]:
load
ICA_CODE,
ApplyMap('MAP_RGP_CODE',Code,'Codes non regroupés') as "Code groupé"
FROM [$(V_QVD_Lib_Root)/exact_bi/BRUT/$(V_Country_Code)/D_ACCOUNT_ICA/D_ACCOUNT_ICA.qvd](qvd);
EXIT script;
your applymap should be:
ApplyMap('MAP_RGP_CODE',ICA_CODE,'Codes non regroupés') as "Code groupé"