Error accessing BigQuery model in SQL query: missing required parameters

Hi everyone,

I’m facing an issue when trying to use a Metabase model inside another SQL query in BigQuery. Specifically, I have a model named #251-attribution-v2, and I’m trying to reference it using the WITH clause like this:

WITH attribution AS {{#251-attribution-v2}}
SELECT * FROM attribution;

However, when I run the query, I get the following error:

Error - Cannot run the query: missing required parameters: #{"251-attribution-v2"}

It seems that the model is either not being recognized or there are parameters that need to be defined but aren’t specified. I’ve confirmed that the model works fine when run independently, so the issue arises only when I try to use it within another query.

Since this database is part of BigQuery, I’m wondering if there are specific steps or syntax required to reference models in BigQuery queries via Metabase.

Has anyone faced a similar issue, or can someone suggest a workaround for this?

Any guidance would be greatly appreciated!

I did a very simple test on Big Query, same as yours:

And it works. What version of metabase are you running? and whats the definition of that model?

We are using the Metabase version: 0.47.8.

Try upgrading to our latest 52.4 and check this again