Filter Out Rows in a Join

(Alejandro Aguilera-Ruiz) #1

There is more than one way to conditionally filter what comes through a join in Looker. To filter our fields (columns), I would recommend taking a look at using the Fields Parameter.

In order to control which rows come through a join, I would recommend using sql_on.

Here is an example of how one would use sql_on:

 - explore: viewA

   joins:

     - join: viewB
       sql_on: (viewA.field = viewB.field AND viewB.field <> 'value')

As one can see, rows that contain 'value' will not be pulled into the explore.

Enjoy!

Cheers,

Alejandro aka: Freedom Looker

0 Likes