Stay organized with collections
Save and categorize content based on your preferences.
ASSIGNMENTS view
The INFORMATION_SCHEMA.ASSIGNMENTS view contains a near real-time list of all
current assignments within the administration project. Each row represents a
single, current assignment. A current assignment is either pending or active and
has not been deleted. For more information about reservation, see Introduction
to Reservations.
Required permission
To query the INFORMATION_SCHEMA.ASSIGNMENTS view, you need the
bigquery.reservationAssignments.list Identity and Access Management (IAM) permission for
the project.
Each of the following predefined IAM roles includes the required
permission:
The INFORMATION_SCHEMA.ASSIGNMENTS view has the following
schema:
Column name
Data type
Value
ddl
STRING
The DDL statement used to create this assignment.
project_id
STRING
ID of the administration project.
project_number
INTEGER
Number of the administration project.
assignment_id
STRING
ID that uniquely identifies the assignment.
reservation_name
STRING
Name of the reservation that the assignment uses.
job_type
STRING
The type of job that can use the reservation. Can be
PIPELINE, QUERY, CONTINUOUS,
ML_EXTERNAL, or BACKGROUND.
assignee_id
STRING
ID that uniquely identifies the assignee resource.
assignee_number
INTEGER
Number that uniquely identifies the assignee resource.
assignee_type
STRING
Type of assignee resource. Can be organization,
folder or project.
Scope and syntax
Queries against this view must include a region qualifier.
If you do not specify a regional qualifier, metadata is retrieved from all
regions. The following table explains the region scope for this view:
PROJECT_ID: the ID of the project to which you have assigned
reservations.
REGION_NAME: the name of the region.
For example, `myproject`.`region-us`.INFORMATION_SCHEMA.ASSIGNMENTS.
The following example gets a project's currently assigned reservation and its
slot capacity. This information is useful for debugging job performance by
comparing the project's slot usage with the slot capacity of the reservation
assigned to that project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.ASSIGNMENTS\u003c/code\u003e view provides a real-time list of all current, non-deleted assignments within the administration project.\u003c/p\u003e\n"],["\u003cp\u003eQuerying this view requires the \u003ccode\u003ebigquery.reservationAssignments.list\u003c/code\u003e IAM permission, which is included in several predefined roles like \u003ccode\u003eroles/bigquery.resourceAdmin\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach row in the view represents a single assignment and contains details such as \u003ccode\u003eassignment_id\u003c/code\u003e, \u003ccode\u003ereservation_name\u003c/code\u003e, \u003ccode\u003ejob_type\u003c/code\u003e, and \u003ccode\u003eassignee_id\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eQueries against this view must include a region qualifier to specify the region from which metadata is retrieved, such as \u003ccode\u003eregion-us\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe view is useful for comparing a project's current slot usage against the slot capacity of its assigned reservation, by showing information such as the \u003ccode\u003ereservation_name\u003c/code\u003e and \u003ccode\u003eslot_capacity\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# ASSIGNMENTS view\n================\n\nThe `INFORMATION_SCHEMA.ASSIGNMENTS` view contains a near real-time list of all\ncurrent assignments within the administration project. Each row represents a\nsingle, current assignment. A current assignment is either pending or active and\nhas not been deleted. For more information about reservation, see [Introduction\nto Reservations](/bigquery/docs/reservations-intro).\n\nRequired permission\n-------------------\n\nTo query the `INFORMATION_SCHEMA.ASSIGNMENTS` view, you need the\n`bigquery.reservationAssignments.list` Identity and Access Management (IAM) permission for\nthe project.\nEach of the following predefined IAM roles includes the required\npermission:\n\n- `roles/bigquery.resourceAdmin`\n- `roles/bigquery.resourceEditor`\n- `roles/bigquery.resourceViewer`\n- `roles/bigquery.user`\n- `roles/bigquery.admin`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nThe `INFORMATION_SCHEMA.ASSIGNMENTS` view has the following\nschema:\n\nScope and syntax\n----------------\n\nQueries against this view must include a [region qualifier](/bigquery/docs/information-schema-intro#syntax).\nIf you do not specify a regional qualifier, metadata is retrieved from all\nregions. The following table explains the region scope for this view:\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\nExample\n-------\n\nTo run the query against a project other than your default project, add the\nproject ID in the following format: \n\n```bash\n`PROJECT_ID`.`region-REGION_NAME`.INFORMATION_SCHEMA.ASSIGNMENTS\n```\n.\n\n\u003cbr /\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project to which you have assigned reservations.\n- \u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e: the name of the region.\n\nFor example, ```myproject`.`region-us`.INFORMATION_SCHEMA.ASSIGNMENTS``.\n\nThe following example gets a project's currently assigned reservation and its\nslot capacity. This information is useful for debugging job performance by\ncomparing the project's slot usage with the slot capacity of the reservation\nassigned to that project. \n\n```googlesql\nSELECT\n reservation.reservation_name,\n reservation.slot_capacity\nFROM\n `\u003cvar translate=\"no\"\u003eRESERVATION_ADMIN_PROJECT\u003c/var\u003e.region-\u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e`.\n INFORMATION_SCHEMA.ASSIGNMENTS_BY_PROJECT assignment\nINNER JOIN\n `\u003cvar translate=\"no\"\u003eRESERVATION_ADMIN_PROJECT\u003c/var\u003e.region-\u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e`.\n INFORMATION_SCHEMA.RESERVATIONS_BY_PROJECT AS reservation\nON\n (assignment.reservation_name = reservation.reservation_name)\nWHERE\n assignment.assignee_id = \"\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\"\n AND job_type = \"QUERY\";\n```"]]