Using variables in sql questions with bigquery database

I think there’s a bug in metabase, or I might be doing something wrong.

When I try to use a field filter variable in an sql question as follows:

  project_id = {{project_id}}

I see the following error: Argument type mismatch in function EQUAL: ‘project_id’ is type string, ‘1’ is type int32

Once I go to bigquery to check what query is being executed, it shows:
project_id = 1 = 1

So basically what’s happening is metabase replaced {{project_id}} filter value with ‘1 = 1’ expression.

Anyone knows WHY does that happen and if there’s any workaround? Thanks

WHERE {{project_id}}

Metabase is clever about these things.

Thanks Andrew, this seems to be working. cheers