Một số tính năng của Gemini trong BigQuery được cung cấp mà không tính thêm phí, trong khi các tính năng khác yêu cầu hạn mức. Hạn mức này được kiếm được bằng cách sử dụng dung lượng điện toán. Để tìm hiểu thêm về cách sử dụng Gemini trong các tính năng của BigQuery, hãy xem bài viết Gemini trong mức giá của BigQuery.
Bật các API cần thiết và cấp vai trò
Để sử dụng Gemini trong BigQuery, bạn phải bật các API bắt buộc và cấp các vai trò Quản lý danh tính và quyền truy cập (IAM) cần thiết. Quản trị viên dịch vụ hoặc chủ sở hữu dự án có quyền IAM serviceusage.services.enable thường thực hiện bước này.
Trong bảng điều khiển Google Cloud , khi dự án của bạn được chọn, hãy chuyển đến trang
BigQuery Studio.
Xem tính năng Gemini trong BigQuery trong bảng điều khiển Google Cloud . Ví dụ: trong BigQuery Studio, hãy di chuột qua biểu tượng pen_sparkarrow_drop_downGemini.
Bạn sẽ được nhắc bật các API Google Cloud khác.
Nhấp vào Tiếp tục để bắt đầu bật các API Google Cloud bắt buộc. Một bảng điều khiển bên liệt kê các API cần thiết để sử dụng Gemini trong BigQuery.
Đối với mỗi API bắt buộc, hãy nhấp vào Bật để bật API cho dự án hiện tại, sau đó nhấp vào Tiếp theo.
Để cấp cho các thực thể chính các vai trò IAM cần thiết để sử dụng Gemini trong BigQuery, hãy nhập tên người dùng của họ.
Các vai trò sau đây cấp các quyền cần thiết để sử dụng Gemini:
Nếu là nhà phân tích dữ liệu, nhà khoa học dữ liệu hoặc nhà phát triển muốn sử dụng các tính năng Gemini cụ thể trong BigQuery để viết truy vấn SQL và mã Python, thì bạn cần bật tính năng này trong bảng điều khiển Google Cloud . Để tìm hiểu cách bật các tính năng, hãy xem phần Trước khi bắt đầu trong phần "Viết truy vấn với sự trợ giúp của Gemini".
Sau đó, những người dùng có vai trò hoặc quyền IAM cần thiết có thể truy cập vào các tính năng của Gemini trong BigQuery mà bạn đã bật cho dự án Google Cloud của họ. Để biết thêm thông tin, hãy xem nội dung Tổng quan về Gemini cho Google Cloud .
Sử dụng thông tin chi tiết về dữ liệu và các tính năng tạo siêu dữ liệu tự động
Thông tin chi tiết về dữ liệu BigQuery và các tính năng tạo siêu dữ liệu tự động được cung cấp cho những khách hàng sử dụng dịch vụ điện toán theo yêu cầu của BigQuery, phiên bản Enterprise hoặc phiên bản Enterprise Plus. Hạn mức quét thông tin chi tiết về dữ liệu và tạo siêu dữ liệu dựa trên việc sử dụng các mô hình điện toán này ở cấp tổ chức. Để biết thông tin về hạn mức cho các tính năng này, hãy xem bài viết Hạn mức cho Gemini trong BigQuery.
Nếu tổ chức của bạn chỉ sử dụng phiên bản BigQuery Standard để tính toán, thì bạn có thể sử dụng Gemini Code Assist Standard. Phiên bản này bao gồm thông tin chi tiết về dữ liệu và khả năng tạo siêu dữ liệu tự động, ngoài các tính năng được liệt kê trong phần Tổng quan về giá của Gemini Code Assist Standard và Enterprise.
Để tìm hiểu cách mua gói thuê bao Gemini Code Assist Tiêu chuẩn, hãy xem bài viết Mua gói thuê bao Gemini Code Assist Tiêu chuẩn và làm theo hướng dẫn để mua phiên bản Tiêu chuẩn.
Bật Gemini trong các tính năng xem trước của BigQuery
Một số tính năng của Gemini trong BigQuery ở chế độ Dùng thử thuộc chương trình người kiểm thử đáng tin cậy. Để yêu cầu quyền truy cập vào các tính năng này,
quản trị viên phải hoàn tất
Biểu mẫu đăng ký Gemini trong BigQuery trước khi phát hành công khai.
Quyền truy cập vào tính năng Gemini trong BigQuery trước khi phát hành công khai được bật định kỳ theo lô.
Sau đây là các tính năng xem trước yêu cầu bạn đăng ký Gemini trong BigQuery:
Hoàn tất truy vấn SQL (Bản xem trước)
Tự động tạo siêu dữ liệu cho thông tin chi tiết về dữ liệu (Bản dùng thử)
Biểu thức ngôn ngữ tự nhiên trong SQL (Thử nghiệm)
Thông tin chi tiết về tập dữ liệu bằng công cụ tri thức BigQuery (Bản dùng thử)
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-11 UTC."],[[["\u003cp\u003eTo use Gemini in BigQuery, you must purchase either the Enterprise Plus edition or Gemini Code Assist Enterprise edition.\u003c/p\u003e\n"],["\u003cp\u003eEnabling Gemini in BigQuery requires enabling the Gemini for Google Cloud API and, optionally, the Recommender API for certain features.\u003c/p\u003e\n"],["\u003cp\u003eGranting users access to Gemini in BigQuery involves assigning them the Gemini for Google Cloud User IAM role, along with other feature-specific roles if needed.\u003c/p\u003e\n"],["\u003cp\u003eCertain preview features, like SQL query completion and Apache Spark assisted troubleshooting, require signing up through the Gemini in BigQuery Pre-GA Sign-up form.\u003c/p\u003e\n"],["\u003cp\u003eData analysts, scientists, or developers need to turn on Gemini in BigQuery features in the Google Cloud console to utilize AI-assisted SQL query and Python code writing.\u003c/p\u003e\n"]]],[],null,["# Set up Gemini in BigQuery\n\nBefore you can use\n[Gemini in BigQuery](/gemini/docs/bigquery/overview), which\noffers AI-powered assistance for your data analytics, your team must do\nthe following:\n\n1. [Enable necessary APIs and grant roles.](#enable-api)\n2. [Turn on Gemini in BigQuery features in\n the Google Cloud console.](#use)\n\nSome Gemini in BigQuery features are available at no\nadditional charge while other features require [quota](/gemini/docs/quotas#bigquery)\nwhich is earned by using compute capacity. To learn more about using\nGemini in BigQuery features, see [Gemini\nin BigQuery pricing](/gemini/pricing#gemini-in-bigquery-pricing).\n| **Note** : Gemini in BigQuery is part of Gemini for Google Cloud and doesn't support the same compliance and security offerings as BigQuery. You should only set up Gemini in BigQuery for BigQuery projects that don't require [compliance offerings that aren't supported by Gemini for Google Cloud](/gemini/docs/discover/certifications). For information about how to turn off or prevent access to Gemini in BigQuery, see [Turn off Gemini for Google Cloud products](/gemini/docs/turn-off-gemini).\n\nEnable necessary APIs and grant roles\n-------------------------------------\n\nTo use Gemini in BigQuery,\nyou must enable required APIs and grant necessary Identity and Access Management (IAM)\nroles. A service administrator or project\nowner with the [`serviceusage.services.enable` IAM permission](/service-usage/docs/access-control#predefined_roles)\ntypically performs this step. For a list of APIs and services used by\nBigQuery, see [Manage BigQuery API dependencies](/bigquery/docs/service-dependencies).\n\n1. In the the Google Cloud console, with your project selected, go to the\n **BigQuery Studio** page.\n\n [Go to BigQuery Studio](https://console.cloud.google.com/bigquery)\n2. View a Gemini in BigQuery feature in the\n the Google Cloud console. For example, in BigQuery Studio hover\n over the\n pen_sparkarrow_drop_down**Gemini**\n icon.\n\n You are prompted to enable additional Google Cloud APIs.\n3. Click **Continue** to get started enabling required\n Google Cloud APIs. A side panel lists the required APIs\n required to use Gemini in BigQuery.\n\n4. For each required API, click **Enable** to enable the API for the current\n project, and then click **Next**.\n\n5. To grant principals the IAM roles that are required to use\n Gemini in BigQuery, enter their user names.\n The following roles grant the permissions required to use Gemini:\n\n - [BigQuery Studio User](/bigquery/docs/access-control#bigquery.studioUser)\n - [BigQuery Studio Admin](/bigquery/docs/access-control#bigquery.studioAdmin)\n6. Click **Done**.\n\nTurn on Gemini in BigQuery features\n-----------------------------------\n\nIf you're a data analyst, data scientist, or developer who wants to use\nspecific Gemini in BigQuery features to write\nSQL queries and Python code, then you need to turn on the feature in\nthe Google Cloud console. To learn how to turn on features, see\n[Before you begin](/bigquery/docs/write-sql-gemini#before_you_begin) in\n\"Write queries with Gemini assistance.\"\nUsers who have the necessary IAM roles or permissions can then access\nthe Gemini in BigQuery features that you enabled\nfor their Google Cloud project. For more information, see\n[Gemini for Google Cloud overview](/gemini/docs/overview).\n\n### Use data insights and automated metadata generation features\n\nBigQuery data insights and automated metadata generation features\nare available to customers using BigQuery on-demand compute,\nEnterprise edition, or Enterprise Plus edition. The quota for\ndata insights scans and metadata generation is based on the use of these\ncompute models at the\norganization level. For information about quotas for these features, see\n[Quotas for Gemini in BigQuery](/gemini/docs/quotas#bigquery).\n\nIf your organization is using BigQuery Standard edition\nfor compute only, then you can use Gemini Code Assist Standard, which\nincludes data insights and automated metadata generation capabilities in\naddition to features listed in [Gemini Code Assist Standard and\nEnterprise pricing\noverview](/products/gemini/pricing#gemini_code_assist_standard_and_enterprise_pricing_overview).\nTo learn how to purchase Gemini Code Assist Standard, see [Purchase a\nGemini Code Assist Standard\nsubscription](/gemini/docs/discover/set-up-gemini#purchase-subscription) and\nfollow the instructions to purchase Standard edition.\n\n### Enable Gemini in BigQuery preview features\n\nCertain Gemini in BigQuery features in\n[Preview](/products#product-launch-stages)\nare part of the trusted tester program. To request access to these features,\nan administrator must complete the\n[Gemini in BigQuery Pre-GA Sign-up form](https://goo.gle/gemini-in-bq-preview).\nGemini in BigQuery pre-GA feature access is\nenabled periodically in batches.\n\nPreview features that require Gemini in BigQuery\nsign-up include the following:\n\n- SQL query completion (Preview)\n- Automated metadata generation for data insights (Preview)\n- Natural language expressions in SQL (Experimental)\n- Dataset insights with BigQuery knowledge engine (Preview)\n\nWhat's next\n-----------\n\n- Learn more about the [types of generative AI assistance available in Gemini for Google Cloud](/gemini/docs/overview).\n- Learn [how Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n- Learn [how to access and manage Gemini administrator controls](/gemini/docs/admin)."]]