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: 
Anonymous
Not applicable

Load Distinct problem

I have an app with multiple fact tables which i am trying to optimize. For that purpose trying to create a link table (have not included that part)

For doing this i am doing a load distnct

load

   Distinct

   Employee_ID,

   Parent,

FactType

resident

MasterData

where FactType='xyz';

Master table has approx 120 million records. 

the result of a expression count(distinct Employee_ID&Parent) is around 400k records 

But somehow the load distinct doesnt work. the above load results in 120 million records

its weird. i remember reading somewhere about this but couldnt find the article again

but basically i replace above script with

load

   Distinct

   Employee_ID,

   Parent,

MinString(FactType)

resident

MasterData

where FactType='xyz'

group by Employee_ID , Parent;

 

this one worked perfectly.

Can someone explain theory behind this?

@rwunderlich @Oleg_Troyansky

10 Replies
Anonymous
Not applicable
Author

Got the answer some errant data in one of the fields were causing the issue. truncating the field solved the issue.
Knew it must have been something simple
thanks for the assistance