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.
- Log into BigQuery
- Select the hamburger menu in the top left corner, then select IAM & Admin > Service Accounts

- Select Create Service Account near the top of the page

- Enter a service account name. This will auto-generate a service account ID

- Select Create and Continue
- Add the following roles:
- BigQuery > BigQuery Data Editor
- BigQuery > BigQuery Data Viewer
- BigQuery > BigQuery Job User
- BigQuery > BigQuery Read Session User
- Cloud Storage > Storage Object Admin
- Cloud Storage > Storage Object Viewer

- Select "Done"
- Select the three vertical dots under Actions, then Manage keys

- Select Add Key > Create New Key

- Check that JSON is selected, then select Create

- Open the file that automatically downloads and copy the content

- Drag a BigQuery node onto the Visual Notebooks workspace
- Select the gear icon beside the Credential field

- Select the plus sign in the upper right corner

- Enter a name for the credentials
- Paste the contents of the downloaded file into the Service Account JSON Key field

Configuration
| Field | Description |
|---|---|
| Name Default: BigQuery | A user-specified node name displayed in the workspace |
| Credential Required | The 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 Required | The name of the desired BigQuery project Enter the name of the desired project. |
| Dataset ID Required | The unique ID of the desired BigQuery dataset Enter the dataset ID for the desired dataset. |
| Table Required | The unique name of the desired BigQuery table Enter the name of the desired table. |
Node Inputs/Outputs
| Input | None |
|---|---|
| Output | Visual 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. |

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.

Figure 2: Example dataframe with default settings