How to Set a Default Dataset in BigQuery Connection to Avoid Specifying Dataset in Queries?

I have a question regarding Hi Metabase Community,

I'm currently using Metabase connected to Google BigQuery and would like to avoid specifying the dataset name in every SQL query.

Current Setup:

  • Database Type: BigQuery
  • Project ID: rbt-data-ksa
  • Dataset Name: dwh_reporting
  • Datasets (in Metabase settings): dwh_reporting (listed under "Only these..." as a comma-separated value)

Issue:

When I run a simple query like:

SELECT *
FROM `customer_ltv`
LIMIT 10;

I get the following error:

400 Bad Request POST https://www.googleapis.com/bigquery/v2/projects/rbt-data-ksa/queries { 
  "code": 400, 
  "errors": [ 
    { 
      "domain": "global", 
      "message": "Table \"customer_ltv\" must be qualified with a dataset (e.g. dataset.table).", 
      "reason": "invalid" 
    } 
  ], 
  "message": "Table \"customer_ltv\" must be qualified with a dataset (e.g. dataset.table).", 
  "status": "INVALID_ARGUMENT" 
}

However, if I fully qualify the table name like this:

SELECT *
FROM `rbt-data-ksa.dwh_reporting.customer_ltv`
LIMIT 10;

The query runs successfully.

What I'm Trying to Achieve:

I want to set dwh_reporting as the default dataset so I can run queries without having to fully qualify the table name each time.

Questions:

  1. Is there a way in Metabase to set a default dataset for BigQuery so that I can omit the dataset name in my queries?
  2. Does the absence of a Service Account JSON file affect this behavior?
  3. Is there a specific configuration I need to adjust in Metabase or BigQuery to make this work?

Any guidance would be greatly appreciated!

Thanks in advance! :rocket:

check https://storage.googleapis.com/simba-bq-release/jdbc/Simba%20Google%20BigQuery%20JDBC%20Connector%20Install%20and%20Configuration%20Guide_1.6.2.1003.pdf DefaultDataset connection property