JOBS_BY_USER view
TheINFORMATION_SCHEMA.JOBS_BY_USER view contains near real-timemetadata about the BigQuery jobs submitted bythe current user in the current project.
Required role
To get the permission that you need to query theINFORMATION_SCHEMA.JOBS_BY_USER view, ask your administrator to grant you theBigQuery User (roles/bigquery.user) IAM role on your project. For more information about granting roles, seeManage access to projects, folders, and organizations.
This predefined role contains the bigquery.jobs.list permission, which is required to query theINFORMATION_SCHEMA.JOBS_BY_USER view.
You might also be able to get this permission withcustom roles or otherpredefined roles.
For more information about BigQuery permissions, seeAccess control with IAM.
Schema
The underlying data is partitioned by thecreation_time column andclustered byproject_id anduser_email.
TheINFORMATION_SCHEMA.JOBS_BY_USER view has the following schema:
| Column name | Data type | Value |
|---|---|---|
bi_engine_statistics | RECORD | If the project is configured to use theBI Engine, then this field containsBiEngineStatistics. OtherwiseNULL. |
cache_hit | BOOLEAN | Whether the query results of this job were from a cache. If you have amulti-query statement job,cache_hit for your parent query isNULL. |
creation_time | TIMESTAMP | (Partitioning column) Creation time of this job. Partitioning is based on the UTC time of this timestamp. |
destination_table | RECORD | Destinationtable for results, if any. |
dml_statistics | RECORD | If the job is a query with a DML statement, the value is a record with the following fields:
NULL.This column is present in the INFORMATION_SCHEMA.JOBS_BY_USER andINFORMATION_SCHEMA.JOBS_BY_PROJECT views. |
end_time | TIMESTAMP | The end time of this job, in milliseconds since the epoch. This field represents the time when the job enters theDONE state. |
error_result | RECORD | Details of any errors asErrorProto objects. |
job_creation_reason.code | STRING | Specifies the high level reason why a job was created. Possible values are:
|
job_id | STRING | The ID of the job if a job was created. Otherwise, the query ID of a query using optional job creation mode. For example,bquxjob_1234. |
job_stages | RECORD | Query stages of the job. Note: This column's values are empty for queries that read from tables with row-level access policies. For more information, seebest practices for row-level security in BigQuery. |
job_type | STRING | The type of the job. Can beQUERY,LOAD,EXTRACT,COPY, orNULL. ANULL value indicates a background job. |
labels | RECORD | Array of labels applied to the job as key-value pairs. |
parent_job_id | STRING | ID of the parent job, if any. |
priority | STRING | The priority of this job. Valid values includeINTERACTIVE andBATCH. |
project_id | STRING | (Clustering column) The ID of the project. |
project_number | INTEGER | The number of the project. |
query | STRING | SQL query text. |
referenced_tables | RECORD | Array oftables referenced by the job. Only populated for query jobs that are not cache hits. |
reservation_id | STRING | Name of the primary reservation assigned to this job, in the formatRESERVATION_ADMIN_PROJECT:RESERVATION_LOCATION.RESERVATION_NAME.In this output:
|
edition | STRING | The edition associated with the reservation assigned to this job. For more information about editions, seeIntroduction to BigQuery editions. |
session_info | RECORD | Details about thesession in which this job ran, if any. |
start_time | TIMESTAMP | The start time of this job, in milliseconds since the epoch. This field represents the time when the job transitions from thePENDING state to eitherRUNNING orDONE. |
state | STRING | Running state of the job. Valid states includePENDING,RUNNING, andDONE. |
statement_type | STRING | The type of query statement. For example,DELETE,INSERT,SCRIPT,SELECT, orUPDATE. SeeQueryStatementType for list of valid values. |
timeline | RECORD | Query timeline of the job. Contains snapshots of query execution. |
total_bytes_billed | INTEGER | If the project is configured to useon-demand pricing, then this field contains the total bytes billed for the job. If the project is configured to useflat-rate pricing, then you are not billed for bytes and this field is informational only. Note: This column's values are empty for queries that read from tables with row-level access policies. For more information, seebest practices for row-level security in BigQuery. |
total_bytes_processed | INTEGER | Total bytes processed by the job. Note: This column's values are empty for queries that read from tables with row-level access policies. For more information, seebest practices for row-level security in BigQuery. |
total_modified_partitions | INTEGER | The total number of partitions the job modified. This field is populated forLOAD andQUERY jobs. |
total_slot_ms | INTEGER | Slot milliseconds for the job over its entire duration in theRUNNING state, including retries. |
total_services_sku_slot_ms | INTEGER | Total slot milliseconds for the job that runs on external services and is billed on the services SKU. This field is only populated for jobs that have external service costs, and is the total of the usage for costs whose billing method is"SERVICES_SKU". |
transaction_id | STRING | ID of thetransaction in which this job ran, if any. |
user_email | STRING | (Clustering column) Email address or service account of the user who ran the job. |
query_info.resource_warning | STRING | The warning message that appears if the resource usage during query processing is above the internal threshold of the system. A successful query job can have the resource_warning field populated. Withresource_warning, you get additional data points to optimize your queries and to set up monitoring for performance trends of an equivalent set of queries by usingquery_hashes. |
query_info.query_hashes.normalized_literals | STRING | Contains the hash value of the query.normalized_literals is a hexadecimalSTRING hash that ignores comments, parameter values, UDFs, and literals. The hash value will differ when underlying views change, or if the query implicitly references columns, such asSELECT *, and the table schema changes.This field appears for successfulGoogleSQL queries that are not cache hits. |
query_info.performance_insights | RECORD | Performance insights for the job. |
query_info.optimization_details | STRUCT | Thehistory-based optimizations for the job. Only theJOBS_BY_PROJECT view has this column. |
transferred_bytes | INTEGER | Total bytes transferred for cross-cloud queries, such as BigQuery Omni cross-cloud transfer jobs. |
materialized_view_statistics | RECORD | Statistics of materialized views considered in a query job. (Preview) |
metadata_cache_statistics | RECORD | Statistics for metadata column index usage for tables referenced in a query job. |
search_statistics | RECORD | Statistics for a search query. |
query_dialect | STRING | This field will be available sometime in May, 2025. The query dialect used for the job. Valid values include:
This field is only populated for query jobs. The default selection of query dialect can be controlled by theconfiguration settings. |
continuous | BOOLEAN | Whether the job is acontinuous query. |
continuous_query_info.output_watermark | TIMESTAMP | Represents the point up to which the continuous query has successfully processed data. |
vector_search_statistics | RECORD | Statistics for a vector search query. |
For stability, we recommend that you explicitly list columns in your information schema queries instead ofusing a wildcard (SELECT *). Explicitly listing columns prevents queries frombreaking if the underlying schema changes.
Data retention
This view displays running jobs along with job history for the past 180 days.If a project migrates to an organization (either from having no organization orfrom a different one), job information predating the migration date isn'taccessible through theINFORMATION_SCHEMA.JOBS_BY_USER view, as the viewonly retains data starting from the migration date.
Scope and syntax
Queries against this view must include aregion qualifier.The following table explains the region scope for this view:
| View name | Resource scope | Region scope |
|---|---|---|
[PROJECT_ID.]`region-REGION`.INFORMATION_SCHEMA.JOBS_BY_USER | Jobs submitted by the current user in the specified project. | REGION |
- Optional:
PROJECT_ID: the ID of your Google Cloud project. If not specified, the default project is used. REGION: anydataset region name. For example,`region-us`.Note: You must usea region qualifier to query
INFORMATION_SCHEMAviews. The location of the query execution must match the region of theINFORMATION_SCHEMAview.
INFORMATION_SCHEMA.JOBS_BY_USER to find a summary costof query jobs, exclude theSCRIPT statement type,otherwise some values might be counted twice. TheSCRIPT row includessummary values for all child jobs that were executed as part of this job.Examples
To run the query against a project other than your default project, add theproject ID in the following format:
`PROJECT_ID`.`region-REGION_NAME`.INFORMATION_SCHEMA.JOBS_BY_USER
PROJECT_ID: the ID of the projectREGION_NAME: the region for your project
For example,`myproject`.`region-us`.INFORMATION_SCHEMA.JOBS_BY_USER.
View pending or running jobs
The following query displays the job ID, creation time, and query of allpending or running jobs submitted by the current user in the designated project:
SELECTjob_id,creation_time,queryFROM`region-REGION_NAME`.INFORMATION_SCHEMA.JOBS_BY_USERWHEREstate!='DONE';
INFORMATION_SCHEMA view names are case-sensitive.The result is similar to the following:
+--------------+---------------------------+---------------------------------+| job_id | creation_time | query |+--------------+---------------------------+---------------------------------+| bquxjob_1 | 2019-10-10 00:00:00 UTC | SELECT ... FROM dataset.table1 || bquxjob_2 | 2019-10-10 00:00:01 UTC | SELECT ... FROM dataset.table2 || bquxjob_3 | 2019-10-10 00:00:02 UTC | SELECT ... FROM dataset.table3 |+--------------+---------------------------+---------------------------------+
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.