Filters & Liquid Parameters for Derived Tables

kshah1
New Member

view: global_dashboard_poc {
  # Or, you could make this view a derived table, like this:
  derived_table: {
    sql: select *
            from test_table
              pivot(max(dimension_value) for LOOKER_COL IN ('CD_1', 'CD_2', 'CD_3'));;

}

}

Is there any possible way where I can have the values inside IN filter ‘CD_1’, ‘CD_2’ etc. get dynamically inserted. The approaches I have tried are templated filters but they add () around the condition which breaks the SQL. The paramteres add extra ‘’ around the single quotes already in the value so it breaks the SQL.

Any work around? Help appreciated. Thanks.

0 0 353
0 REPLIES 0
Top Labels in this Space
Top Solution Authors