Introduction to saved queries

This document provides an introduction to saved queries in BigQuery.You can use saved queries to create and manage SQL scripts. Changes to a savedquery are automatically saved so that you don't lose your work when you closethe query editor.Saved queries improve collaboration and query management with the followingoptions:

  • Share saved querieswith specific users and groups by usingIdentity and Access Management (IAM).
  • Review the query version history.
  • Revert to or branch from previous versions of the query.

Saved queries areBigQuery Studiocode assets powered byDataform.Notebooks are also code assets. Allcode assets are stored in a defaultregion. Updating the default region changesthe region for all code assets created after that point.

Saved query capabilities are available only in the Google Cloud console.

Saved query security

You control access to saved queries by using Identity and Access Management (IAM) roles.For more information, seeShare saved queries.

Supported regions

BigQuery Studio lets you save, share, and manage saved queries. Thefollowing table lists the regions where BigQuery Studio is available:

Region descriptionRegion nameDetails
Africa
Johannesburgafrica-south1
Americas
Columbusus-east5
Dallasus-south1leaf iconLow CO2
Iowaus-central1leaf iconLow CO2
Las Vegasus-west4
Los Angelesus-west2
Mexiconorthamerica-south1
Montréalnorthamerica-northeast1leaf iconLow CO2
North Virginiaus-east4
Oklahomaus-central2leaf iconLow CO2
Oregonus-west1leaf iconLow CO2
Salt Lake Cityus-west3
Santiagosouthamerica-west1leaf iconLow CO2
São Paulosouthamerica-east1leaf iconLow CO2
South Carolinaus-east1
Torontonorthamerica-northeast2leaf iconLow CO2
Asia Pacific
Bangkokasia-southeast3
Delhiasia-south2
Hong Kongasia-east2
Jakartaasia-southeast2
Melbourneaustralia-southeast2
Mumbaiasia-south1
Osakaasia-northeast2
Seoulasia-northeast3
Singaporeasia-southeast1
Sydneyaustralia-southeast1
Taiwanasia-east1
Tokyoasia-northeast1
Europe
Belgiumeurope-west1leaf iconLow CO2
Berlineurope-west10
Finlandeurope-north1leaf iconLow CO2
Frankfurteurope-west3
Londoneurope-west2leaf iconLow CO2
Madrideurope-southwest1leaf iconLow CO2
Milaneurope-west8
Netherlandseurope-west4leaf iconLow CO2
Pariseurope-west9leaf iconLow CO2
Stockholmeurope-north2leaf iconLow CO2
Turineurope-west12
Warsaweurope-central2
Züricheurope-west6leaf iconLow CO2
Middle East
Dammamme-central2
Dohame-central1
Tel Avivme-west1

Quotas and limits

For more information, seeSaved query quotas and limits.

Limitations

Saved queries have the following limitations:

Classic saved queries

Deprecated: Saved queries, available inBigQuery Studio,will fully replace classic saved queries in the future. The deprecation timeline is being reviewed.For more information, seeDeprecation of classic saved queries.To learn how to migrate to saved queries, seeMigrate classic saved queries.

Classic saved queries are an earlier way of saving and sharing SQL queries.Classic saved queries provide the query text, and the only query settingretained by a classic saved query is the SQL version. This settinggoverns whether the query uses legacy SQL or GoogleSQL. Toquery the data, users must have access to the data that the saved queryaccesses.

You can see classic saved queries in the(Classic) Queries folder in theClassic Explorer pane:

The (Classic) Queries folder in the Explorer pane.

Note: If you have not enabled BigQuery Studio, classicsaved queries appear in theSaved queries (NUMBER) folder intheClassic Explorer pane, instead of the(Classic) Queries folder.

There are 3 types of classic saved queries:

You canmigrateclassic saved queries to saved queries to take advantage of the newcapabilities, orcontinue to maintain themas classic saved queries until deprecation. The timeline for deprecation is being reviewed.

The classic saved query feature is available only in theGoogle Cloud console.

Deprecation of classic saved queries

The saved queries feature ofBigQuery Studiois replacing classic saved queries. The deprecation timeline is being reviewed.To edit existing classic saved queries after deprecation, you mustmigrate classic queriesto BigQuery Studio saved queries.

If users, including yourself, have personal queries withinformation that shouldn't be made available to others with access to data inthe project, then the query's owner must delete the queries or the informationbefore completing the migration.

To support this transition, the following BigQuery IAMroles were updated in February 2024:

  • BigQuery Admin(roles/bigquery.admin) getsDataform Admin(roles/dataform.admin) permissions.

  • BigQuery Job User(roles/bigquery.jobUser) gets the following permissions:

    • dataform.locations.get
    • dataform.locations.list
    • dataform.repositories.create
    • dataform.repositories.list
  • BigQuery User(roles/bigquery.user) gets the following permissions:

    • dataform.locations.get
    • dataform.locations.list
    • dataform.repositories.create
    • dataform.repositories.list
Warning: Visibility for code assets is governed by project-levelDataform permissions. Users with thedataform.repositories.list permission—which is included in standardBigQuery roles such asBigQuery Job User,BigQuery Studio User,andBigQuery User—cansee all code assets in theExplorer panel of the Google Cloud project,regardless of whether they created these assets or these assets were sharedwith them. To restrict visibility, you can createcustom rolesthat exclude thedataform.repositories.list permission.

To let users without the BigQuery Admin, BigQuery Job User, or BigQuery Userroles use saved queries, grant themtherequired permissionsin IAM.

Custom roles won't be automatically updated.To update a custom role with therequired permissions,seeEdit an existing custom role.

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.