Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MoeyE
Partner - Creator II
Partner - Creator II

What comes first, the lookup or the filter?

Hi,

I am wondering when I have a source lookup on a column in a table, then I also have a filter on the table. What comes first? Are the records filtered then the source lookup occurs? or does the source lookup occur then the rows are filtered?

Regards,

Mo

Labels (1)
1 Solution

Accepted Solutions
john_wang
Support
Support

Hello @MoeyE ,

It depends task settings. Maybe filter first, or maybe lookup first.

Let's see the filter "Filter Conditions" :

If the filter column is the source table's column eg PK , then in Full Load, filter take effective first then lookup. In CDC, filter first then lookup.

If the filter column is the "Calculated" column (eg the column value comes from lookup operation) then in both Full load and CDC, lookup first then filter.

In short, Replicate is smart to do filter first if possible to reduce the lookup operations.

There are another 2 filters, I ever summarized their difference in article Pass thru filter. In these 2 filter, probably lookup first then filter.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

3 Replies
john_wang
Support
Support

Hello @MoeyE ,

Good question 🙂 Please allow me some minutes to confirm for you.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @MoeyE ,

It depends task settings. Maybe filter first, or maybe lookup first.

Let's see the filter "Filter Conditions" :

If the filter column is the source table's column eg PK , then in Full Load, filter take effective first then lookup. In CDC, filter first then lookup.

If the filter column is the "Calculated" column (eg the column value comes from lookup operation) then in both Full load and CDC, lookup first then filter.

In short, Replicate is smart to do filter first if possible to reduce the lookup operations.

There are another 2 filters, I ever summarized their difference in article Pass thru filter. In these 2 filter, probably lookup first then filter.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
MoeyE
Partner - Creator II
Partner - Creator II
Author

Hi John,

Thanks for the help as always!

Regards,

Mohammed