Hello! I have a view that has a parameter. It is structured just like this
view: table_1 {
derived_table: {
sql:
SELECT
CASE
WHEN {% parameter timeframe_picker %} = 'Day' THEN DATE_TRUNC(date, day)
WHEN {% parameter timeframe_picker %} = 'Week' THEN DATE_TRUNC(date, week)
WHEN {% parameter timeframe_picker %} = 'Month' THEN DATE_TRUNC(date, month)
ELSE NULL
END
AS date…
Now I'm trying to build a second view querying the first one, just like this:
view: table_2 {
derived_table: {
sql:SELECT * FROM ${table_1.SQL_TABLE_NAME} …
I also created a parameter on table_2 and I tried multiple times in different ways to make parameter from table_2 to dialogue with parameter from table_1. But I always get this error:
Even when I try to specify the parameter using ._parameter_value or to write it as view_name.parameter_name. Nothing works. How can I create this table_2 necessarily using the table_1? Can someone help me please? ?