Are SQL template variables available within Dimens...
# announcements
f
Are SQL template variables available within Dimension definitions? We defined a dimension as:
Copy code
SELECT 
  hid as user_id,
  CASE
    WHEN created_at >= '{{ startDate }}' THEN 'New'
    ELSE 'Existing'
  END as value
from owners
But in all queries where we try to slice by the dimension,
{{ startDate }}
isn’t substituted
I think I answered my own question. This is an Experiment dimension since it relies on the experiment assignment date, so must be added to the Data Source SQL directly, right?
f
Yeah, that makes sense to add to the assignment query directly I think.