Hi. I read the article " Outer Join on False - or: How I learned to stop fanning-out and love the NULL and [Analytic Block] - Pivot by Top X - Introducing bind_all_filters: yes. First of all, thanks for the great articles.
I’m trying to make a model / Explore which:
PDTs
in a way like the first article describes, where the data is not fanned-out by performing “normal” joins between the 4 tablesbind_all_filters
), which get pre-filtered before being merged for the final user-facing table. This is for performance reasons; our source tables are > 25TB each, and I’d rather do the joining of these tables after they are relatively small by being already-filtered.AND
filter. May provide user the ability to make this an OR
for certain searches.sql_always_where
clause of “OR TRUE
” (without parenthesis) on the final table. Still have to test this.I’m pretty sure I can do something similar to the above using Liquid variables for every single filterable field (there are like 3 dozen), but I’d rather try doing it with bind_all_filters
, if I can do it in a performance-friendly way.
I’m a bit confused by the bind_all_filters
feature, though. The article states:
Note: A native derived table with
bind_all_filters
is required to be joined in the same explore it came from; i.e.,explore
=explore_source
This is confusing me. At what “stage” in the source Explore does the NDT
receive its input table? My explore was going to include:
PDTs
if the noted NDTs
have to use explore_source
targets contained in the explore (not arbitrary SQL
tables)But if the [4+1] NDTs
all get their tables from the single Explore source, and those tables are included in the Explore source, this seems cyclical. Do the NDTs
get the “full” table obtained after doing all the joining in the Explore? And then they just pick the columns that they need? If so, wouldn’t this cause a possible performance loss (tons of superfluous rows per NDT
) by joining those tables into a massive table before applying my custom logic?
Questions:
explore_source
? I’ve been meaning to just play with what Looker generates as SQL
while playing with such an Explore, but I haven’t been able to dedicate enough time.bind_all_filters
versus Liquid variables?Thanks so much!!
Sean