C3 AI Documentation Home

BigQuery Node

Load data from BigQuery into Visual Notebooks.

Prerequisites

You must add a BigQuery "service account JSON key" to use the BigQuery node. Follow the steps below to generate this key and add it to Visual Notebooks. For more information, see the Google Cloud documentation.

  1. Log into BigQuery
  2. Select the hamburger menu in the top left corner, then select IAM & Admin > Service Accounts BigQuery IAM & Admin menu
  3. Select Create Service Account near the top of the page Create service account button
  4. Enter a service account name. This will auto-generate a service account ID Service account details
  5. Select Create and Continue
  6. Add the following roles:
    1. BigQuery > BigQuery Data Editor
    2. BigQuery > BigQuery Data Viewer
    3. BigQuery > BigQuery Job User
    4. BigQuery > BigQuery Read Session User
    5. Cloud Storage > Storage Object Admin
    6. Cloud Storage > Storage Object Viewer Service account roles
  7. Select "Done"
  8. Select the three vertical dots under Actions, then Manage keys Manage service account keys
  9. Select Add Key > Create New Key Create new key
  10. Check that JSON is selected, then select Create Select JSON key type
  11. Open the file that automatically downloads and copy the content Copy JSON key content
  12. Drag a BigQuery node onto the Visual Notebooks workspace
  13. Select the gear icon beside the Credential field BigQuery node credentials
  14. Select the plus sign in the upper right corner Add new credential
  15. Enter a name for the credentials
  16. Paste the contents of the downloaded file into the Service Account JSON Key field Configure BigQuery credentials

Configuration

FieldDescription
Name Default: BigQueryA user-specified node name displayed in the workspace
Credential RequiredThe information needed to access BigQuery data Select a saved credential from the dropdown menu. Select the gear icon to add a new credential or delete existing credentials.
Project ID RequiredThe name of the desired BigQuery project Enter the name of the desired project.
Dataset ID RequiredThe unique ID of the desired BigQuery dataset Enter the dataset ID for the desired dataset.
Table RequiredThe unique name of the desired BigQuery table Enter the name of the desired table.

Node Inputs/Outputs

InputNone
OutputVisual Notebooks returns a table, called a dataframe, that contains all uploaded data. Columns are labeled and include a symbol that specifies the data type of that column.

Example dataframe output

Figure 1: Example dataframe output

Examples

  • Enter the project ID, dataset ID, and name of the BigQuery table that contains the desired data.
  • Select "Run" to create a dataframe with the default settings.

Example dataframe with default settings

Figure 2: Example dataframe with default settings

Was this page helpful?