Use the Google Cloud for Visual Studio Code extension

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

Note: To provide feedback or ask questions that are related to this Previewfeature, contactbigquery-ide-plugin@google.com.

The Google CloudVisual Studio Code (VS Code)extension lets you do the following in VS Code:

  • Develop and execute BigQuery notebooks.
  • Browse, inspect, and preview BigQuery datasets.

Before you begin

  1. In your local terminal, check to make sure you havePython 3.11 or later installed on yoursystem:

    python3--version
  2. Install the Google Cloud CLI.

  3. In your local terminal,initialize the gcloud CLI:

    gcloudinit
  4. Configure a default project:

    gcloudconfigsetprojectPROJECT_ID

    ReplacePROJECT_ID with your default project.

  5. Set upApplication Default Credentials:

    gcloudauthapplication-defaultlogin
  6. Download and install VS Code.

  7. Open VS Code, and then in the activity bar, clickExtensions.

  8. Using the search bar, find theJupyter extension, and then clickInstall. The BigQuery features in VS Code require theJupyter extension by Microsoft as a dependency.

    A list of Jupyter extensions in the VS Code console.

Install the Google Cloud extension

  1. Open VS Code, and then in the activity bar, clickExtensions.
  2. Using the search bar, find theGoogle Cloud Code extension, and thenclickInstall.

    The Google Cloud Code extension in the VS Code console.

  3. If prompted, restart VS Code.

TheGoogle Cloud Code icon is now visible in the activity bar.

Configure the extension

  1. Open VS Code, and then in the activity bar, clickGoogle Cloud Code.
  2. Open theBigQuery Notebooks section.
  3. ClickLogin to Google Cloud. You are redirected to sign in with yourcredentials.
  4. Use the top-level application taskbar to navigate toCode> Settings> Settings> Extensions.
  5. FindGoogle Cloud Code, and click theManage icon to open the menu.
  6. SelectSettings.
  7. For theCloud Code: Project setting, enter the name of theGoogle Cloud project that you want to use to execute notebooks anddisplay BigQuery datasets.
  8. For theCloud Code > Beta: BigQuery Region setting, enter aBigQuery location.The extension displays datasets from this location.

Develop BigQuery notebooks

  1. Open VS Code, and then in the activity bar, clickGoogle Cloud Code.
  2. Open theBigQuery Notebooks section, and clickBigQuery Notebook. Anew.ipynb file containing sample code is created and opened in the editor.
  3. In the new notebook, clickSelect Kernel, and select a Python kernel.BigQuery notebooks require a local Python kernel forexecution. You can create a new virtual environment or use one of theexisting ones.

    The select kernel interface in the VS Code console.

  4. If it hasn't already been installed in your virtual environment, install thebigframes client library:

    1. Open theTerminal window.
    2. Run thepip install bigframes command.

You can now write and execute code in your BigQuery notebook.

Explore and preview BigQuery datasets

  1. Open VS Code, and then in the activity bar, clickGoogle Cloud Code.
  2. To see datasets and tables from your specified project and region, open theBigQuery Datasets section. BigQuery public datasets arealso visible.
  3. To open a new tab in the editor, click any table name. This tab contains thetable details, schema, and preview.

Pricing

The Visual Studio Code extension is free, but you are charged for anyGoogle Cloud services (BigQuery, Dataproc,Cloud Storage) that you use.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.