Connecting to BigQuery

You’ll need to be an owner in your Google Cloud project to create a service account. If you’re not, please contact the administrator of your BigQuery database.

  1. Visit the Credentials page in Google Cloud Console

  2. Select your project Screenshot of selecting your Google Cloud project

  3. Click Create credentials, and then Service account key Screenshot of the Create credentials button

  4. Click New service account, name it (ie “PopSQL BigQuery” or your full name), give it the BigQuery Admin role, select JSON, and hit the Create button. Screenshot of the New service account form

  5. Download the .json file, open it in a text editor, and copy the entire file contents to your clipboard. Screenshot of opening the service account in Sublime Text

  6. Open the PopSQL connections modal, click New Connection, name it, choose BigQuery as the type, paste your clipboard (the .json file contents) into the Service Account field, and hit Connect. Screenshot of pasting the service account in PopSQL

  7. Once you’re connected, try this sample query:

    SELECT title FROM [bigquery-public-data:samples.wikipedia] LIMIT 5;

    Happy querying! 🍭