Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 11, 2023 7:02:44 AM
Sep 16, 2013 8:38:26 AM
QlikView and Qlik Sense load either missing or additional zeros, compared to the values in the data source.
For example data like in the below script is loaded with incorrect leading zeros.
LOAD * Inline [
F1, F2
1, a
01, b
02, c
2, d
];
On the second row the leading zero is missing, and on the fourth row, there is an unexpected additional leading zero.
QlikView
Qlik Sense Enterprise on Windows
Qlik Cloud
The observed behaviour is a part of fundamental Qlik engine functionality and data compression technique.
In short, this means that Qlik interprets and associates loaded data by best effort. As part of Qlik optimization and compression technique the same reoccurring value in a field is stored on the first occurrence only, and the following occurrence reference to the first (stored) value. This means that two values with identical numerical representation can not be stored with two different textual presentations in the same field in Qlik.
Please keep in mind that all numerical values in Qlik act as dual values. This means that they have an underlying numerical value that is used for calculations, and a textual formatted value which is the value seen in charts or as calculations results.
In the example below four rows of data are loaded. In the field F1 there are four different value.
LOAD * Inline [
F1, F2
1, a
01, b
02, c
2, d
];
Identical numerical values are associated with the same textual presentation value in Qlik . For this reason, it is not possible to store the same numerical value with different textual presentation values.
One way to resolve this is to format the values as text by using Text() during reload.
LOAD
text(F1) as F1,
F2
Inline [
F1, F2
1, a
01, b
02, c
2, d
];
This will result in the visual values looking identical to the data source.
NOTE: Value formatted with Text() will not have underlying numerical values, hence calculations on these values is not possible.
Any chance this behavior will ever be "fixed"?
Spend hours finding out why a match did not work and then finding a way to create a valid workaround.
Eventually used IF(LEN(EANcode)<>LEN(NUM(EANcode)), TEXT(EANcode), EANcode) AS EANcode,
To get both values in the application.
Hello @p_verkooijen
We are unaware of a plan to change the behaviour. If you want to raise awareness with our product team to have this reviewed, I suggest raising an idea here: Ideation.
All the best,
Sonja
We've used to deal with this issue as described above in our on-prem Qlik Enterprise landscape. Any recommendation how to overcome this issue when loading data via Qlik DataTransfer into cloud? (no possibility to edit load statement to add text()-formula...)
Highly appreciate any tips...
Best regards Sam
Hello @SamKng
For detailed assistance with this, please post your requirements directly in the Qlik Sense Data Connectivity forum, where our active support agents and your knowledgeable Qlik peers can assist you.
All the best,
Sonja
Hi,
I'm managing an ETL app where a lot of fields need to be treated as text.
Since the load is based on a simple SELECT * I would need to change every Load * to a list of fields with the Text() function.
Moreover, additional fields are planned to be added in the future to the DB.
Is there a way to avoid this changes?
A global setting to be set in the initial part of the main script would be the ideal solution.
Thanks
Hello @Fabiano_Martino_Intelco
For detailed assistance, please post your requirements directly in the Qlik Sense Data Connectivity forum, where our active support agents and your knowledgeable Qlik peers can assist you.
All the best,
Sonja