The Derived Tables documentation reads:
Looker supports a conditional
WHERE
clause for dev mode that helps manage this:
- view: my_view
derived_table:
sql: |
SELECT
columns
FROM
my_table
WHERE
-- if prod -- date > '2000-01-01'
-- if dev -- date > '2015-01-01'
In this example the query will include all data from 2000 onward when in production, but only the data from 2015 onward when in dev mode.
Does this feature exist for SQL
where
clauses outside of derived tables, e.g. in measures or dimensions?
Does this feature exist for SQL clauses other than
where
, e.g.from tbl -- if dev -- partition (p1)
?
Does it exist outside of SQL, e.g.
-- if prod -- hidden:true
for fields or explores, perhaps with different syntax?
If not, consider this a request. :-)