Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement where I need to populate region name in the Main table if it is blank in the source database from an excel sheet(Region Master) based on the RequestID else the Region should come from source database only.
How can this be done efficiently?The Main table contains more than 10K records.
MAP:
MAPPING LOAD RequestID, Region FROM EXCEL.xls;
MAIN:
LOAD RequestID,
if(len(trim(Region))=0,ApplyMap('MAP', RequestID,'No Region found'), Region) as Region,
....
FROM MAIN;
are you wanting to update the value in the source database or in the QlikView application
it sounds like the value will be based on Region master file if it is null?
MAP:
MAPPING LOAD RequestID, Region FROM EXCEL.xls;
MAIN:
LOAD RequestID,
if(len(trim(Region))=0,ApplyMap('MAP', RequestID,'No Region found'), Region) as Region,
....
FROM MAIN;
yes , we can effectively handle such situation by using mapping table . in your case you can create your excel workbook as mapping table which will map the Region value to target table (main table) .
Source_Map:
Mapping load
RequestID,
Region
From .. Excel workbook
Noconcatenate
Main_Table:
Load
.
.
.
RequestID,
ALT(Region , ApplyMap('Source_Map',RequestID,Null()) As Region
.
.
From Source Database .Table