BigQuery no project in Smart Variable

Hi There,

I cannot use Field Filter variable with my BigQuery dataset. The problem is that the Database connection setting Project ID (override) is not transferred to this smart variable based on a column in the same dataset.

Query in Editor:

SELECT
  l.order_number AS ordernumber
FROM
  `project.dataset.orderlines_with_productinfo` AS l
  WHERE l.website_name = {{website_name}}

Query Preview:

SELECT
  l.order_number AS ordernumber
FROM
  `project.dataset.orderlines_with_productinfo` AS l
 
WHERE l.website_name = (`dataset.orderlines_with_productinfo`.`website_name` = '1_Demo'

As you can see it is missing the project. This gives the following error:

{
  "code": 400,
  "errors": [
    {
      "domain": "global",
      "location": "q",
      "locationType": "parameter",
      "message": "Unrecognized name: `dataset.orderlines_with_productinfo` at [xx:xx]",
      "reason": "invalidQuery"
    }
  ],
  "message": "Unrecognized name: `dataset.orderlines_with_productinfo` at [xx:xx]",
  "status": "INVALID_ARGUMENT"
}

check the syntax Field filters | Metabase Documentation

@dragonsahead i did but that is not helping me. The problem is the automatic conversion that Metabase makes from Query in Editor >> Query in Preview. The part below is generated by Metabase itself and there is the problem that there is no Project.

(`dataset.orderlines_with_productinfo`.`website_name` = '1_Demo')

please post the query again with the new syntax

I’ve it working:

SELECT
  order_number
FROM
  `dataset.orderlines_with_productinfo`
WHERE
    {{website_name}}

But only to remove the project inside the FROM statement. So the project override in the BigQuery database settings is not working.