9.4. Google BigQuery Setup and Service Account Key Creation

Introduction

Welcome to our GitBook on setting up Google BigQuery and creating a service account key. This guide is designed to help you get started with BigQuery, Google's fully-managed, petabyte-scale, and cost-effective cloud data warehouse that lets you run super-fast SQL-like queries on your data.

The guide is organized into several sections. Each section contains a specific step in the process of setting up BigQuery and creating a service account key.

Table of Contents

  1. Introduction to Google BigQuery

  2. Setting Up Google BigQuery

  3. Creating a Google Cloud Service Account Key

1. Introduction to Google BigQuery

Google BigQuery is a web service from Google that is used for handling and analyzing big data. It's part of the Google Cloud Platform. BigQuery works with Google's infrastructure, allowing you to execute SQL-like queries on multiple datasets. Its primary features include a columnar storage, data compression, and built-in machine learning capabilities.

2. Setting Up Google BigQuery

2.1 Google Cloud Console

  1. If you haven't already, sign in to your Google account. If you don't have one, you'll need to create a Google Account.

  2. Once logged in, you'll need to create a new Project.

    • Click on the project drop-down and select New Project.

    • In the new window, give your project a name, then click Create.

2.2 Enable BigQuery API

  1. After your project is created, you need to enable the BigQuery API.

  2. In the Google Cloud Console, go to the APIs & Services -> Library.

  3. In the Library, search for BigQuery API and click on the result.

  4. In the BigQuery API page, click Enable to enable the API for your project.

3. Creating a Google Cloud Service Account Key

3.1 Creating a Service Account

  1. In the Google Cloud Console, go to IAM & Admin -> Service Accounts.

  2. Click Create Service Account.

  3. In the Service account name field, enter a name. The Google Cloud Console fills in the Service account ID field based on this name.

  4. In the Service account description field, enter a description.

  5. Click Create.

3.2 Granting Permissions to the Service Account

  1. On the Service account permissions page, select the Role drop-down list.

  2. In the role list, select BigQuery -> BigQuery Admin to grant full access to BigQuery resources.

  3. Click Continue.

3.3 Creating a JSON key for the Service Account

  1. On the Grant users access to this service account page, click Create Key.

  2. In the Create key pane, select the JSON key type.

  3. Click Create. A JSON key file is downloaded to your system.

Note: Securely store the JSON key file. If someone obtains your key file, they could use it to access and consume your BigQuery resources.

3.4 Adding JSON Key to AI2SQL

  1. In the setup form, you will be asked to provide your JSON key.

  2. Open the JSON key file you downloaded from the Google Cloud Console in a text editor. Copy all of its content.

  3. In the next field, labeled 'Dataset ID', enter the specific Dataset ID that you want to use.

  4. Paste the copied content in the Service Account Key field in AI2SQL.

  5. Click Add Connector.

Last updated