[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-24。"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.BI_CAPACITIES\u003c/code\u003e view provides metadata about the current state of BI Engine capacity within a project.\u003c/p\u003e\n"],["\u003cp\u003eQuerying this view requires the \u003ccode\u003ebigquery.bireservations.get\u003c/code\u003e IAM permission for BI Engine reservations.\u003c/p\u003e\n"],["\u003cp\u003eResults from the view include details like project ID, capacity size in bytes, and preferred tables for which the capacity is used.\u003c/p\u003e\n"],["\u003cp\u003eQueries must include a region qualifier, and the optional project ID allows querying from other projects if needed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebi_capacity_name\u003c/code\u003e is always \u003ccode\u003edefault\u003c/code\u003e as there can currently only be one BI Engine capacity per project.\u003c/p\u003e\n"]]],[],null,["# INFORMATION_SCHEMA.BI_CAPACITIES view\n=====================================\n\nThe `INFORMATION_SCHEMA.BI_CAPACITIES` view contains metadata about the current\nstate of BI Engine capacity. If you want to view the history\nof changes to BI Engine reservation, see the\n[`INFORMATION_SCHEMA.BI_CAPACITY_CHANGES` view](/bigquery/docs/information-schema-bi-capacity-changes).\n\nRequired permission\n-------------------\n\nTo query the `INFORMATION_SCHEMA.BI_CAPACITIES` view, you need the\n`bigquery.bireservations.get` Identity and Access Management (IAM) permission for\nBI Engine reservations.\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nWhen you query the `INFORMATION_SCHEMA.BI_CAPACITIES` view, the query results\ncontain one row with current state of BI Engine capacity.\n\nThe `INFORMATION_SCHEMA.BI_CAPACITIES` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must include a\n[region qualifier](/bigquery/docs/information-schema-intro#syntax). A project ID\nis optional. If no project ID is specified, the project that the query runs\nin is used.\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: any [dataset region name](/bigquery/docs/locations). For example, ```region-us```.\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\n**Example** \n\n -- Returns current state of BI Engine capacity.\n SELECT * FROM myproject.`region-us`.INFORMATION_SCHEMA.BI_CAPACITIES;\n\nExamples\n--------\n\nThe following example retrieves current BI Engine capacity changes from\n`INFORMATION_SCHEMA.BI_CAPACITIES` view.\n\nTo run the query against a project other than the project that the query is\nrunning in, add the project ID to the region in the following format:\n```````\u003cvar translate=\"no\"\u003eproject_id\u003c/var\u003e````.````\u003cvar translate=\"no\"\u003eregion_id\u003c/var\u003e````.INFORMATION_SCHEMA.BI_CAPACITIES```.\n\nThe following example shows the current state of BI Engine in the\nproject with id 'my-project-id': \n\n SELECT *\n FROM `my-project-id.region-us`.INFORMATION_SCHEMA.BI_CAPACITIES\n\nThe result looks similar to the following:\n\n\u003cbr /\u003e\n\n```\n +---------------+----------------+------------------+--------------+-----------------------------------------------------------------------------------------------+\n | project_id | project_number | bi_capacity_name | size | preferred_tables |\n +---------------+----------------+------------------+--------------+-----------------------------------------------------------------------------------------------+\n | my-project-id | 123456789000 | default | 268435456000 | \"my-company-project-id.dataset1.table1\",\"bigquery-public-data.chicago_taxi_trips.taxi_trips\"] |\n +---------------+----------------+------------------+--------------+-----------------------------------------------------------------------------------------------+\n \n```\n\n\u003cbr /\u003e\n\nThe following example returns size of BI Engine capacity in\ngigabytes for the query project: \n\n SELECT\n project_id,\n size/1024.0/1024.0/1024.0 AS size_gb\n FROM `region-us`.INFORMATION_SCHEMA.BI_CAPACITIES\n\nThe result looks similar to the following:\n\n\u003cbr /\u003e\n\n```\n +---------------+---------+\n | project_id | size_gb |\n +---------------+---------+\n | my-project-id | 250.0 |\n +---------------+---------+\n \n```\n\n\u003cbr /\u003e"]]