Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

QVD optimized load when field values contain leading zeroes

Hi all --

I apologize if this has been discussed previously, I searched but didn't find anything.

Does anyone know how to do an optimized qvd load if a field contains values with leading zeroes?  Our product SKUs are text fields comprised of numeric strings some of which have leading zeros, for example SKU 13105 is a 1/4" bolt sold in bulk whereas SKU 013105 is the same 1/4" bolt sold in packages of 100.  The issue we're running into is that Qlikview is dropping the leading zero because it's interpretting the value as a number so I've had to use text() in the load script.  This causes the load to not be optimized.  Is there a script setting which would allow me to load the SKU without the transformation and retain that leading zero?

Thanks,

Leigh

Tags (2)
15 Replies
danielrozental
Honored Contributor II

QVD optimized load when field values contain leading zeroes

I just did a quick test and QlikView didn't drop leading zeros, is it possible that zeros were lost in a previous step? like in the data extraction?

You could also just live with the zeros being dropped and change the number settings for the field in the document properties.

Luminary
Luminary

Re: QVD optimized load when field values contain leading zeroes

Hi Leigh,

Very interesting question. But let me ask you whether it's worth spending extra time worrying about Optimized Load? I understand that optimized load is the fatest process but sometimes is it really worth to put the extra effort and making the script more complex. I'm not against Optimized Load process but I'm just suggesting to strike a balance wherever possible. But your case must be different, how big is the dataset? If you have dataset with high cardinality then it makes sense to use Optimized Load.

We can try seperating the numeric strings from the text, but I think any action to unwrap the Ram image will lead to Unoptimized Load process.

I'm sure fellow community members can suggest something more interesting.

Sorry, I could not be great help. But I'm keeping my eyes open to learn from this post.

Cheers,

DV

MVP & Luminary
MVP & Luminary

QVD optimized load when field values contain leading zeroes

Sorry no, the transformation of any field will force the unoptimized load.  A solution is to use text() on the fields before storing in the QVD.

-Rob

Luminary
Luminary

Re: QVD optimized load when field values contain leading zeroes

Thanks Rob. How is Text() not considered as transformation? I'm missing something important here...

Thanks again.

Regards,

DV

Not applicable

QVD optimized load when field values contain leading zeroes

Hi Rob --

We do use Text() when loading and storing into the QVD.  The issue is when we load from the QVD the text data type is not retained and the leading zeroes are again dropped.

Not applicable

Re: QVD optimized load when field values contain leading zeroes

DV --

We are currently using an unoptimized load with few issues, but of course, we are always looking for ways to speed things up even if just by a few milliseconds.    Our data set is a few hundred million records, the underlying issue is that the Product SKU is very prevalent within the data set so we are doing a lot of Text() transformations.  The unoptimized load is acceptable, I was just curious if we could shave some time off.

Thanks,

Leigh

MVP & Luminary
MVP & Luminary

QVD optimized load when field values contain leading zeroes

I had not thought about things getting "untexted" when reloading the QVD. I'll need to test that out and see if I can give you any suggestions.

-Rob

Not applicable

Re: QVD optimized load when field values contain leading zeroes

Daniel Rozental wrote:

I just did a quick test and QlikView didn't drop leading zeros, is it possible that zeros were lost in a previous step? like in the data extraction?

You could also just live with the zeros being dropped and change the number settings for the field in the document properties.

Hm, we had different results in our testing.  The data extraction is a straight SQL Query from Oracle and doesn't drop the leading zeroes, the zeroes were dropped in the load by Qlikview.  I'll have to run some more tests.

We cannot live with the zeroes being dropped as each value is a distinct product identifier. 

marcelo_7
Contributor

Re: QVD optimized load when field values contain leading zeroes

Hi Leigh,

Did you ever find a solution to your problem because I'm having the exact same one.

Cheers!

/Marcelo