You are viewing the documentation for Metabase v0.26. The most recent docs version is v0.63.
Version v0.26 of Metabase is no longer supported. Check out the docs for the current stable version, Metabase v0.63.

Working with Google BigQuery in Metabase

Starting in v0.15.0 Metabase provides a driver for connecting to BigQuery directly and executing queries against any datasets you have. The below sections provide information on how to get connected and troubleshoot any issues that may come up.

Connecting to a BigQuery Dataset

  1. make sure you have a Google Cloud Platform account with a Project you would like to use in Metabase.
  • Start by giving this connection a Name and providing your Google Cloud Platform Project ID along with your desired BigQuery Dataset ID. If you don’t have a dataset and want to play around with something we recommend copying one of the sample tables Basic Fields
  • Follow the Click here link provided below the Client ID field which will open a new browser tab and guide you through the process of generating OAuth 2.0 credentials for Metabase. Make sure to choose Other for your application type. Client ID
  • take the resulting client ID and client secret and copy them over to Metabase. Client Details
  • Now follow the link below the Auth Code field for Click here to get an auth code which will open a new browser window and authorize your credentials for a BigQuery access token to use the api. Simply click the Allow button. Generating an Auth Code
  • Copy the resulting code provided into the Auth Code field in Metabase. Copying the Auth Code
  • Click the Save button!

Metabase will now begin inspecting your BigQuery Dataset and finding any tables and fields to build up a sense for the schema. Give it a little bit of time to do its work and then you’re all set to start querying.

Using Standard SQL

By default, Metabase tells BigQuery to interpret queries as Legacy SQL. If you prefer using Standard SQL instead, you can tell Metabase to do so by including a #standardSQL directive at the beginning of your query:

Enabling Standard SQL