ORGANIZATION_OPTIONS view
You can query the INFORMATION_SCHEMA.ORGANIZATION_OPTIONS
view to retrieve real-time metadata about BigQuery organization options. This view contains default settings at the organization level.
Required permissions
To get organization options metadata, you need the following Identity and Access Management (IAM) permissions:
bigquery.config.get
The following predefined IAM role includes the permissions that you need in order to get organization options metadata:
roles/bigquery.jobUser
For more information about granular BigQuery permissions, see roles and permissions.
Schema
When you query the INFORMATION_SCHEMA.ORGANIZATION_OPTIONS
view, the query results contain one row for each configuration in an organization.
The INFORMATION_SCHEMA.ORGANIZATION_OPTIONS
view has the following schema:
Column name | Data type | Value |
---|---|---|
OPTION_NAME |
STRING |
One of the name values in the options table. |
OPTION_DESCRIPTION |
STRING |
The option description. |
OPTION_TYPE |
STRING |
The data type of the OPTION_VALUE . |
OPTION_VALUE |
STRING |
The current value of the option. |
Options table
OPTION_NAME |
OPTION_TYPE |
OPTION_VALUE |
---|---|---|
default_time_zone |
STRING |
The default time zone for this organization. |
default_kms_key_name |
STRING |
The default key name for this organization. |
default_query_job_timeout_ms |
STRING |
The default query timeout in milliseconds for this organization. |
default_interactive_query_queue_timeout_ms |
STRING |
The default timeout in milliseconds for queued interactive queries for this organization. |
default_batch_query_queue_timeout_ms |
STRING |
The default timeout in milliseconds for queued batch queries for this organization. |
Data retention
This view contains currently running sessions and the history of sessions completed in the past 180 days.
Scope and syntax
Queries against this view must have a region qualifier.
View name | Resource scope | Region scope |
---|---|---|
`region-REGION`.INFORMATION_SCHEMA.ORGANIZATION_OPTIONS |
Configuration options within the specified organization. | REGION |
Replace the following:
REGION
: any dataset region name. For example,region-us
.
Examples
The following example retrieves the OPTION_NAME
, OPTION_TYPE
, and OPTION_VALUE
columns from the INFORMATION_SCHEMA.ORGANIZATION_OPTIONS
.
SELECT option_name, option_type, option_value FROM `region-us`.INFORMATION_SCHEMA.ORGANIZATION_OPTIONS;
The result is similar to the following:
+--------------------------------------------+-------------+---------------------+ | option_name | option_type | option_value | +--------------------------------------------+-------------+---------------------+ | default_time_zone | STRING | America/Los_Angeles | +--------------------------------------------+-------------+---------------------+ | default_kms_key_name | STRING | test/testkey1 | +--------------------------------------------+-------------+---------------------+ | default_query_job_timeout_ms | INT64 | 18000000 | +--------------------------------------------+-------------+---------------------+ | default_interactive_query_queue_timeout_ms | INT64 | 600000 | +--------------------------------------------+-------------+---------------------+ | default_batch_query_queue_timeout_ms | INT64 | 1200000 | +--------------------------------------------+-------------+---------------------+