Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys!
I have the following script:
1.Section "SQL load":
LIB CONNECT TO 'Oracle_base';
[All_packs]:
SQL
select
field1
,field2
,DIVISION2
,field3
from TABLE1
;
2. Section "MAPPING"
[Branch_mapping]:
MAPPING LOAD * INLINE
[
from|to
030102|City1
050101|City2
050201|City3
090101|City4
](delimiter is |);
3. Section "Qlik sense Load"
[All_packs_adv]:
NoConcatenate Load
field1
,field2
,ApplyMap('Branch_mapping', DIVISION2) as DIVISION2
,field5
Resident All_packs;
drop table All_packs;
So, I have no any error! All loads well.
But in the end, when I see the DIVISION2 field in filter or anywere, I just see the number, but not like "City1".
Maybe someone have an idea, why does Qlik sense ignores the mapping?
For consistency, I'd suggest applying either num#() or text() to both sides. Note that it's typically a good idea to do this in the Load section, so you'll want to add one of those to your SQL.
Those are strings, not numbers (you can tell because they're justified to the left rather than the right). Make sure your data types are identical on both sides of the load and it'll presumably work correctly.
Hi!
You mean that I need to apply a TEXT function to the DIVISION2 field? Or num-function?
For consistency, I'd suggest applying either num#() or text() to both sides. Note that it's typically a good idea to do this in the Load section, so you'll want to add one of those to your SQL.
Thanks a lot for your suggestions!
But could you please give a syntax, where exactly I should use text() or num#(), to what both sides I have to use one of these functions?
Sorry about that, I'm really newbie in Qlik 😅
Load Text(DIVISION2) as DIVISION2, OtherFieldsHere;
SQL Select SomeFields from SomeTable;
Mapping Load Text(from) as from, to
From SomeTable2;