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 nameData typeValue
bi_engine_statisticsRECORD If the project is configured to use theBI Engine, then this field containsBiEngineStatistics. OtherwiseNULL.
cache_hitBOOLEANWhether 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_timeTIMESTAMP (Partitioning column) Creation time of this job. Partitioning is based on the UTC time of this timestamp.
destination_tableRECORD Destinationtable for results, if any.
dml_statisticsRECORD If the job is a query with a DML statement, the value is a record with the following fields:
  • inserted_row_count: The number of rows that were inserted.
  • deleted_row_count: The number of rows that were deleted.
  • updated_row_count: The number of rows that were updated.
For all other jobs, the value isNULL.
This column is present in theINFORMATION_SCHEMA.JOBS_BY_USER andINFORMATION_SCHEMA.JOBS_BY_PROJECT views.
end_timeTIMESTAMPThe end time of this job, in milliseconds since the epoch. This field represents the time when the job enters theDONE state.
error_resultRECORD Details of any errors asErrorProto objects.
job_creation_reason.codeSTRING Specifies the high level reason why a job was created.
Possible values are:
  • REQUESTED: job creation was requested.
  • LONG_RUNNING: the query request ran beyond a system defined timeout specified by thetimeoutMs field in theQueryRequest. As a result it was considered a long running operation for which a job was created.
  • LARGE_RESULTS: the results from the query cannot fit in the in-line response.
  • OTHER: the system has determined that the query needs to be executed as a job.
job_idSTRINGThe 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_stagesRECORDQuery 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_typeSTRING The type of the job. Can beQUERY,LOAD,EXTRACT,COPY, orNULL. ANULL value indicates a background job.
labelsRECORDArray of labels applied to the job as key-value pairs.
parent_job_idSTRINGID of the parent job, if any.
prioritySTRINGThe priority of this job. Valid values includeINTERACTIVE andBATCH.
project_idSTRING(Clustering column) The ID of the project.
project_numberINTEGER The number of the project.
querySTRINGSQL query text.
referenced_tablesRECORD Array oftables referenced by the job. Only populated for query jobs that are not cache hits.
reservation_idSTRING Name of the primary reservation assigned to this job, in the formatRESERVATION_ADMIN_PROJECT:RESERVATION_LOCATION.RESERVATION_NAME.
In this output:
  • RESERVATION_ADMIN_PROJECT: the name of the Google Cloud project that administers the reservation
  • RESERVATION_LOCATION: the location of the reservation
  • RESERVATION_NAME: the name of the reservation
editionSTRINGThe edition associated with the reservation assigned to this job. For more information about editions, seeIntroduction to BigQuery editions.
session_infoRECORD Details about thesession in which this job ran, if any.
start_timeTIMESTAMPThe 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.
stateSTRING Running state of the job. Valid states includePENDING,RUNNING, andDONE.
statement_typeSTRING The type of query statement. For example,DELETE,INSERT,SCRIPT,SELECT, orUPDATE. SeeQueryStatementType for list of valid values.
timelineRECORDQuery timeline of the job. Contains snapshots of query execution.
total_bytes_billedINTEGER 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_processedINTEGER

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_partitionsINTEGER The total number of partitions the job modified. This field is populated forLOAD andQUERY jobs.
total_slot_msINTEGERSlot milliseconds for the job over its entire duration in theRUNNING state, including retries.
total_services_sku_slot_msINTEGERTotal 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_idSTRING ID of thetransaction in which this job ran, if any.
user_emailSTRING (Clustering column) Email address or service account of the user who ran the job.
query_info.resource_warningSTRING 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 theresource_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_literalsSTRING 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_insightsRECORDPerformance insights for the job.
query_info.optimization_detailsSTRUCT Thehistory-based optimizations for the job. Only theJOBS_BY_PROJECT view has this column.
transferred_bytesINTEGERTotal bytes transferred for cross-cloud queries, such as BigQuery Omni cross-cloud transfer jobs.
materialized_view_statisticsRECORDStatistics of materialized views considered in a query job. (Preview)
metadata_cache_statisticsRECORDStatistics for metadata column index usage for tables referenced in a query job.
search_statisticsRECORDStatistics for a search query.
query_dialectSTRING This field will be available sometime in May, 2025. The query dialect used for the job. Valid values include:
  • GOOGLE_SQL: Job was requested to use GoogleSQL.
  • LEGACY_SQL: Job was requested to use LegacySQL.
  • DEFAULT_LEGACY_SQL: No query dialect was specified in the job request. BigQuery used the default value of LegacySQL.
  • DEFAULT_GOOGLE_SQL: No query dialect was specified in the job request. BigQuery used the default value of GoogleSQL.

This field is only populated for query jobs. The default selection of query dialect can be controlled by theconfiguration settings.
continuousBOOLEANWhether the job is acontinuous query.
continuous_query_info.output_watermarkTIMESTAMPRepresents the point up to which the continuous query has successfully processed data.
vector_search_statisticsRECORDStatistics 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 nameResource scopeRegion scope
[PROJECT_ID.]`region-REGION`.INFORMATION_SCHEMA.JOBS_BY_USERJobs submitted by the current user in the specified project.REGION
Replace the following:
  • 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 queryINFORMATION_SCHEMA views. The location of the query execution must match the region of theINFORMATION_SCHEMA view.

Note: When you queryINFORMATION_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
Replace the following:

  • PROJECT_ID: the ID of the project
  • REGION_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';
Note: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.