Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Loss after DROP FIELD statement

Dear Community,

has anyone experienced the loss of a record from a table after dropping a field (unique identifier) that is the unique difference between 2 records??

When trying to simulate this case QV seems to work in the proper way!!

Enclosed is the simplified example of the case (however it works perfectly well!) while irl in our App we lose a record. When undoing the drop of the field everything worked fine again...

Best regards

P.

13 Replies
sunny_talwar

I don't see any data loss. There are 10 observations in Test table and 10 observations in Test1 Table

Capture.PNG

2016-05-03 08_48_19-C__Users_sunny.a.talwar_Downloads_Test DataLoss.qvw.png

robert_mika
Master III
Master III

Can you post more information about the lost record?

Not applicable
Author

Hi Sunny, that's indeed the case as I already mentioned in mij explanation. When shaping our datamodel for a real live DataModel/App this occurred.

BR

P.

Not applicable
Author

Hi Robert,

unfortunately it's not possible to post the complete App here due to complexity, security and size.

That's why I asked for similar experiences. I hoped for answers that this could occur in relation to certain versions of QV or....??

Looks like we have to do more elaborate testing and trying!!

Thx for your interest.

BR P.

avinashelite

could you please share the sample data set and demonstrate the loss of data ?? so that we can identify the issue..

jonathandienst
Partner - Champion III
Partner - Champion III

First check that this is truely the case. Views like the Tablebox only show the distinct rows, but they may still exist as two separate rows.

Having checked that, then I suspect that is due to the way the distinct keyword works in QV. If you have any load step for the table (including joins), then the distinct attribute is applied to the table from that point onward. You are dropping the field that is keeping the records distinct. Since they are no longer distinct and the table has the distinct attribute (because an earlier LOAD had the distinct keyword), the "duplicate" row will be dropped.

This applies even on a join, so

Left Join (Table1)

LOAD distinct * Resident Table2;

then Table1 will be marked as distinct and duplicate records will be dropped.

See here:

DISTINCT can be deceiving - The Qlik Fix! The Qlik Fix!

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Robert,

the data was more or less what's in the test QVW. But in larger quantities (ca 20.000.000 records).

Hope this is sufficient info.

BR

P.

robert_mika
Master III
Master III

Jonathan have explained even more in detail what I had want to say.