Variables not working with BigQuery

Hi,

I’m testing MetaBase as a possible visualization layeron top of Google BigQuery. I’ve been trying to create queries with date range variables - both as “Date” variables, and as a “Field Filter” variable. In both cases I’m getting syntax errors from BigQuery.

Due to the nature of the implementation, being tied to a single user (and not to a service account, for example), I can see the queries that were sent to BQ through their UI; all of the variable fields are left intact, resulting in queries like:

select {{app_dt}} from base_enriched limit 1

Obviously, this cannot work. Am I missing something, or are variables not supported with BigQuery?

Apparently it's just not supported yet:

Do we have any update on this if this feature is working now?
Thanks

I’m trying to do this (This is in bigquery and I’m getting error: A valid date part name is required at [3:35]):
select
timestamp_trunc(w.created_at, {{duration}}) as period
from
dbt_prod.wapi__workouts w
limit 10

@Kajal For BigQuery you need to do a lot more to be able to do something like that - see last comment:
https://github.com/metabase/metabase/issues/6583 - upvote by clicking :+1: on the first post

1 Like