Field Filter Issue : Sql With Clause and View

By any chance is it not possible to use with clause SQL query in filed filter .
To avoid this i tried using view but filter is not populating with values in drop down. Got below error.

Hi @Prajakta2021
Post "Diagnostic Info" from Admin > Troubleshooting, and which database type you're querying.
Post the query.

Unfortunately i cant paste the query on portal but please check below sample query -
select * from my_view
where {{my_var}}

my_var is string type column in my_view and i want to select list of column to filter data. i have update the data model as shown in below image.

@Prajakta2021 Well, that should work, but without any other details, then I cannot help you.

i guess its issue with bigquery. Will check it again


  1. Check the BigQuery query log to see more details.
  2. Check the Metabase log - Admin > Troubleshooting > Logs.
1 Like

Thanks. bigquery log did helped.

Then it would help everyone else if you wrote what the problem was and how you fixed it

Metabase log showed me which query it was sending to BQ and what is the output getting from BQ.
So that where i found that specific to filed filter we need to use tilda to display table name. That resolved my issue.