Skip to main content

Official Support Articles

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!

Qlik REST connector adds leading zero to all repeated number values if the first one has a leading zero

cancel
Showing results for 
Search instead for 
Did you mean: 
Andre_Sostizzo
Digital Support
Digital Support

Qlik REST connector adds leading zero to all repeated number values if the first one has a leading zero

The Qlik REST connector might add a leading zero to all repeated number values if the first one has a leading zero.

Environment:

 

Resolution:

 

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(s):

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,
...

 

 

Internal Investigation ID(s):

  • QB-1310
  • QB-1259


 

Labels (1)
Version history
Last update:
‎2021-05-17 04:47 AM
Updated by: