Enable code asset management
You can save, share, and manage versions of code assets such as notebooks and saved queries. This document explains how to manually enable code assets, and how to set the default region and grant access to other users.
Automatic enablement of BigQuery APIs
The following APIs are automatically enabled for all Google Cloud projects with BigQuery:
- Analytics Hub
- BigQuery Connection
- BigQuery Data Policy
- BigQuery Reservation
- Compute Engine API
- Dataform
- Dataplex
- Vertex AI API
Before March 2024, these APIs were not automatically enabled. If you have automation scripts from before March 2024 that depended on the status of these APIs, then you might need to update them.
These APIs don't incur any additional costs. Users with Identity and Access Management permissions to use enabled services on corresponding resources can incur charges, as described in BigQuery pricing, Dataform pricing, and Dataplex pricing.
You can prevent enablement of additional APIs by setting the Restrict Resource Service Usage organization policy constraint. You can disable selected APIs at any time.
Before you begin
To manually enable code asset management,
you must have the Identity and Access Management (IAM)
Owner (roles/owner
) role.
Manually enable BigQuery code assets
You can manually enable BigQuery code asset management by enabling the following APIs:
- The Compute Engine API
- The Dataform API
- The Vertex AI API
Enable code assets by following these steps:
Go to the BigQuery page.
In the tab bar of the editor pane, click the
arrow drop down next to the + sign, and then click Compose new Python notebook.In the banner that appears under the tab bar of the editor pane, click Enable.
If you don't see the banner, check if you have the required IAM Owner role.
In the Enable features pane, in the Core feature APIs section, do the following:
- To enable version history and sharing of code assets, under Version history and sharing, click Enable.
- To enable notebooks, under Python notebooks, click Enable all.
- When the APIs have been enabled, click Next.
Optional: Set user permissions in the Permissions section:
- To grant principals the ability to create code assets, and to read, edit, and set permissions for the code assets they created, type their user or group names in Creator.
- To grant principals the ability to read, edit, and set permissions for all code assets shared with them, type their user or group names in Owner.
Click Next.
Optional: Click Enable all in the Additional APIs section to enable the APIs that you need in order to create BigQuery remote procedures by using BigQuery DataFrames.
If you chose not to enable the additional APIs, click Close to close the Enable features pane.
Set the default region for code assets
All code assets use the same default region. Follow these steps to set the default region for code assets:
Go to the BigQuery page.
In the Explorer pane, find the project in which you have enabled code assets.
Click
View actions next to the project, and then click Change my default code region.In Region, select the region that you want to use for code assets.
Click Select.
Grant access to other users
After you have enabled code asset management, you can give other users access to code assets by granting them the appropriate Identity and Access Management roles. For more information, see Grant access to notebooks and Grant access to saved queries.
What's next
- Learn how to create notebooks.
- Learn how to create saved queries.