Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 17, 2021 4:47:49 AM
Apr 2, 2020 4:57:48 PM
The Qlik REST connector might add a leading zero to all repeated number values if the first one has a leading zero.
Please note that this behavior is quite known and is working as designed. In fact this behavior is related to the Qlik engine and can be reproduced in a simple script without using the Qlik REST connector.
Example:
id, name
02501,alpha
2501,beta
2502,gamma
2503,omega
After the reload, the values will be: 02501,02501,2502,2503. 2501 is missing.
In the example above, the engine will interpret the id column as numbers. The engine will pick the first occurrence (based on load order) of the number 2501 in id column, which will be 02501, and use that as the sting representation of the number. If you really want to keep the initial zero and treat 02501 and 2501 as two different things, you need to load the id column with an explicit cast to text.
Such as:
LOAD text(id) as id, name
INLINE [
id, name
02501,alpha
2501,beta
2502,gamma
2503,omega
];
Workaround 1:
For more details (including workarounds) please see the article Leading zeros are missing in loaded data values
Workaround 2:
Add a load statement for the RestConnectorMasterTable fields pre-setting the problem field as a Text field with the Text() function. (causing $Text auto-tagging)
Example:
RestConnectorMasterTable:
Load
...
Text(field_numType) as field_TextType,
...