Job

JSON representation
 { 
 "kind" 
 : 
 string 
 , 
 "etag" 
 : 
 string 
 , 
 "id" 
 : 
 string 
 , 
 "selfLink" 
 : 
 string 
 , 
 "user_email" 
 : 
 string 
 , 
 "configuration" 
 : 
 { 
 object (  JobConfiguration 
 
) 
 } 
 , 
 "jobReference" 
 : 
 { 
 object (  JobReference 
 
) 
 } 
 , 
 "statistics" 
 : 
 { 
 object (  JobStatistics 
 
) 
 } 
 , 
 "status" 
 : 
 { 
 object (  JobStatus 
 
) 
 } 
 , 
 "principal_subject" 
 : 
 string 
 , 
 "jobCreationReason" 
 : 
 { 
 object (  JobCreationReason 
 
) 
 } 
 } 
Fields
kind

string

Output only. The type of the resource.

etag

string

Output only. A hash of this resource.

id

string

Output only. Opaque ID field of the job.

user_ email

string

Output only. Email address of the user who ran the job.

configuration

object ( JobConfiguration )

Required. Describes the job configuration.

job Reference

object ( JobReference )

Optional. Reference describing the unique-per-user name of the job.

statistics

object ( JobStatistics )

Output only. Information about the job, including starting time and ending time of the job.

status

object ( JobStatus )

Output only. The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.

principal_ subject

string

Output only. [Full-projection-only] String representation of identity of requesting party. Populated for both first- and third-party identities. Only present for APIs that support third-party identities.

job Creation Reason

object ( JobCreationReason )

Output only. The reason why a Job was created. Preview

JobConfiguration

JSON representation
 { 
 "jobType" 
 : 
 string 
 , 
 "query" 
 : 
 { 
 object (  JobConfigurationQuery 
 
) 
 } 
 , 
 "load" 
 : 
 { 
 object (  JobConfigurationLoad 
 
) 
 } 
 , 
 "copy" 
 : 
 { 
 object (  JobConfigurationTableCopy 
 
) 
 } 
 , 
 "extract" 
 : 
 { 
 object (  JobConfigurationExtract 
 
) 
 } 
 , 
 "dryRun" 
 : 
 boolean 
 , 
 "jobTimeoutMs" 
 : 
 string 
 , 
 "labels" 
 : 
 { 
 string 
 : 
 string 
 , 
 ... 
 } 
 } 
Fields
job Type

string

Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.

query

object ( JobConfigurationQuery )

[Pick one] Configures a query job.

load

object ( JobConfigurationLoad )

[Pick one] Configures a load job.

copy

object ( JobConfigurationTableCopy )

[Pick one] Copies a table.

extract

object ( JobConfigurationExtract )

[Pick one] Configures an extract job.

dry Run

boolean

Optional. If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.

job Timeout Ms

string ( Int64Value format)

Optional. Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop a longer job, but may not always succeed in canceling it before the job completes. For example, a job that takes more than 60 seconds to complete has a better chance of being stopped than a job that takes 10 seconds to complete.

labels

map (key: string, value: string)

The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

JobConfigurationQuery

JobConfigurationQuery configures a BigQuery query job.

JSON representation
 { 
 "query" 
 : 
 string 
 , 
 "destinationTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "tableDefinitions" 
 : 
 { 
 string 
 : 
 { 
 object (  ExternalDataConfiguration 
 
) 
 } 
 , 
 ... 
 } 
 , 
 "userDefinedFunctionResources" 
 : 
 [ 
 { 
 object (  UserDefinedFunctionResource 
 
) 
 } 
 ] 
 , 
 "createDisposition" 
 : 
 string 
 , 
 "writeDisposition" 
 : 
 string 
 , 
 "defaultDataset" 
 : 
 { 
 object (  DatasetReference 
 
) 
 } 
 , 
 "priority" 
 : 
 string 
 , 
 "preserveNulls" 
 : 
 boolean 
 , 
 "allowLargeResults" 
 : 
 boolean 
 , 
 "useQueryCache" 
 : 
 boolean 
 , 
 "flattenResults" 
 : 
 boolean 
 , 
 "maximumBillingTier" 
 : 
 integer 
 , 
 "maximumBytesBilled" 
 : 
 string 
 , 
 "useLegacySql" 
 : 
 boolean 
 , 
 "parameterMode" 
 : 
 string 
 , 
 "queryParameters" 
 : 
 [ 
 { 
 object (  QueryParameter 
 
) 
 } 
 ] 
 , 
 "schemaUpdateOptions" 
 : 
 [ 
 string 
 ] 
 , 
 "timePartitioning" 
 : 
 { 
 object (  TimePartitioning 
 
) 
 } 
 , 
 "rangePartitioning" 
 : 
 { 
 object (  RangePartitioning 
 
) 
 } 
 , 
 "clustering" 
 : 
 { 
 object (  Clustering 
 
) 
 } 
 , 
 "destinationEncryptionConfiguration" 
 : 
 { 
 object (  EncryptionConfiguration 
 
) 
 } 
 , 
 "scriptOptions" 
 : 
 { 
 object (  ScriptOptions 
 
) 
 } 
 , 
 "connectionProperties" 
 : 
 [ 
 { 
 object (  ConnectionProperty 
 
) 
 } 
 ] 
 , 
 "createSession" 
 : 
 boolean 
 , 
 "systemVariables" 
 : 
 { 
 object (  SystemVariables 
 
) 
 } 
 } 
Fields
query

string

[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or GoogleSQL.

destination Table

object ( TableReference )

Optional. Describes the table where the query results should be stored. This property must be set for large results that exceed the maximum response size. For queries that produce anonymous (cached) results, this field will be populated by BigQuery.

table Definitions

map (key: string, value: object ( ExternalDataConfiguration ))

Optional. You can specify external table definitions, which operate as ephemeral tables that can be queried. These definitions are configured using a JSON map, where the string key represents the table identifier, and the value is the corresponding external data configuration object.

user Defined Function Resources[]

object ( UserDefinedFunctionResource )

Describes user-defined function resources used in the query.

create Disposition

string

Optional. Specifies whether the job is allowed to create new tables. The following values are supported:

  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table.
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result.

The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

write Disposition

string

Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:

  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the data, removes the constraints, and uses the schema from the query result.
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table.
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result.

The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

default Dataset

object ( DatasetReference )

Optional. Specifies the default dataset to use for unqualified table names in the query. This setting does not alter behavior of unqualified dataset names. Setting the system variable @@dataset_id achieves the same behavior. See https://cloud.google.com/bigquery/docs/reference/system-variables for more information on system variables.

priority

string

Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.

preserve Nulls

boolean

[Deprecated] This property is deprecated.

allow Large Results

boolean

Optional. If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For GoogleSQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.

use Query Cache

boolean

Optional. Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.

flatten Results

boolean

Optional. If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For GoogleSQL queries, this flag is ignored and results are never flattened.

maximum Billing Tier

integer

Optional. [Deprecated] Maximum billing tier allowed for this query. The billing tier controls the amount of compute resources allotted to the query, and multiplies the on-demand cost of the query accordingly. A query that runs within its allotted resources will succeed and indicate its billing tier in statistics.query.billingTier, but if the query exceeds its allotted resources, it will fail with billingTierLimitExceeded. WARNING: The billed byte amount can be multiplied by an amount up to this number! Most users should not need to alter this setting, and we recommend that you avoid introducing new uses of it.

maximum Bytes Billed

string ( Int64Value format)

Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.

use Legacy Sql

boolean

Optional. Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's GoogleSQL: https://cloud.google.com/bigquery/sql-reference/

When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false.

parameter Mode

string

GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.

query Parameters[]

object ( QueryParameter )

jobs.query parameters for GoogleSQL queries.

schema Update Options[]

string

Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified:

  • ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
  • ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
time Partitioning

object ( TimePartitioning )

Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

range Partitioning

object ( RangePartitioning )

Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

clustering

object ( Clustering )

Clustering specification for the destination table.

destination Encryption Configuration

object ( EncryptionConfiguration )

Custom encryption configuration (e.g., Cloud KMS keys)

script Options

object ( ScriptOptions )

Options controlling the execution of scripts.

connection Properties[]

object ( ConnectionProperty )

Connection properties which can modify the query behavior.

create Session

boolean

If this property is true, the job creates a new session using a randomly generated sessionId. To continue using a created session with subsequent queries, pass the existing session identifier as a ConnectionProperty value. The session identifier is returned as part of the SessionInfo message within the query statistics.

The new session's location will be set to Job.JobReference.location if it is present, otherwise it's set to the default location based on existing routing logic.

system Variables

object ( SystemVariables )

Output only. System variables for GoogleSQL queries. A system variable is output if the variable is settable and its value differs from the system default. "@@" prefix is not included in the name of the System variables.

SystemVariables

System variables given to a query.

JSON representation
 { 
 "types" 
 : 
 { 
 string 
 : 
 { 
 object (  StandardSqlDataType 
 
) 
 } 
 , 
 ... 
 } 
 , 
 "values" 
 : 
 { 
 object 
 } 
 } 
Fields
types

map (key: string, value: object ( StandardSqlDataType ))

Output only. Data type for each system variable.

values

object ( Struct format)

Output only. Value for each system variable.

ScriptOptions

Options related to script execution.

JSON representation
 { 
 "statementTimeoutMs" 
 : 
 string 
 , 
 "statementByteBudget" 
 : 
 string 
 , 
 "keyResultStatement" 
 : 
 enum (  KeyResultStatementKind 
 
) 
 } 
Fields
statement Timeout Ms

string ( Int64Value format)

Timeout period for each statement in a script.

statement Byte Budget

string ( Int64Value format)

Limit on the number of bytes billed per statement. Exceeding this budget results in an error.

key Result Statement

enum ( KeyResultStatementKind )

Determines which statement in the script represents the "key result", used to populate the schema and query results of the script job. Default is LAST.

KeyResultStatementKind

KeyResultStatementKind controls how the key result is determined.

Enums
KEY_RESULT_STATEMENT_KIND_UNSPECIFIED Default value.
LAST The last result determines the key result.
FIRST_SELECT The first SELECT statement determines the key result.

JobConfigurationLoad

JobConfigurationLoad contains the configuration properties for loading data into a destination table.

JSON representation
 { 
 "sourceUris" 
 : 
 [ 
 string 
 ] 
 , 
 "fileSetSpecType" 
 : 
 enum (  FileSetSpecType 
 
) 
 , 
 "schema" 
 : 
 { 
 object (  TableSchema 
 
) 
 } 
 , 
 "destinationTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "destinationTableProperties" 
 : 
 { 
 object (  DestinationTableProperties 
 
) 
 } 
 , 
 "createDisposition" 
 : 
 string 
 , 
 "writeDisposition" 
 : 
 string 
 , 
 "nullMarker" 
 : 
 string 
 , 
 "fieldDelimiter" 
 : 
 string 
 , 
 "skipLeadingRows" 
 : 
 integer 
 , 
 "encoding" 
 : 
 string 
 , 
 "quote" 
 : 
 string 
 , 
 "maxBadRecords" 
 : 
 integer 
 , 
 "schemaInlineFormat" 
 : 
 string 
 , 
 "schemaInline" 
 : 
 string 
 , 
 "allowQuotedNewlines" 
 : 
 boolean 
 , 
 "sourceFormat" 
 : 
 string 
 , 
 "allowJaggedRows" 
 : 
 boolean 
 , 
 "ignoreUnknownValues" 
 : 
 boolean 
 , 
 "projectionFields" 
 : 
 [ 
 string 
 ] 
 , 
 "autodetect" 
 : 
 boolean 
 , 
 "schemaUpdateOptions" 
 : 
 [ 
 string 
 ] 
 , 
 "timePartitioning" 
 : 
 { 
 object (  TimePartitioning 
 
) 
 } 
 , 
 "rangePartitioning" 
 : 
 { 
 object (  RangePartitioning 
 
) 
 } 
 , 
 "clustering" 
 : 
 { 
 object (  Clustering 
 
) 
 } 
 , 
 "destinationEncryptionConfiguration" 
 : 
 { 
 object (  EncryptionConfiguration 
 
) 
 } 
 , 
 "useAvroLogicalTypes" 
 : 
 boolean 
 , 
 "referenceFileSchemaUri" 
 : 
 string 
 , 
 "hivePartitioningOptions" 
 : 
 { 
 object (  HivePartitioningOptions 
 
) 
 } 
 , 
 "decimalTargetTypes" 
 : 
 [ 
 enum (  DecimalTargetType 
 
) 
 ] 
 , 
 "jsonExtension" 
 : 
 enum (  JsonExtension 
 
) 
 , 
 "parquetOptions" 
 : 
 { 
 object (  ParquetOptions 
 
) 
 } 
 , 
 "preserveAsciiControlCharacters" 
 : 
 boolean 
 , 
 "columnNameCharacterMap" 
 : 
 enum (  ColumnNameCharacterMap 
 
) 
 , 
 "copyFilesOnly" 
 : 
 boolean 
 } 
Fields
source Uris[]

string

[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the '*' wildcard character is not allowed.

file Set Spec Type

enum ( FileSetSpecType )

Optional. Specifies how source URIs are interpreted for constructing the file set to load. By default, source URIs are expanded against the underlying storage. You can also specify manifest files to control how the file set is constructed. This option is only applicable to object storage systems.

schema

object ( TableSchema )

Optional. The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.

destination Table

object ( TableReference )

[Required] The destination table to load the data into.

destination Table Properties

object ( DestinationTableProperties )

Optional. [Experimental] Properties with which to create the destination table if it is new.

create Disposition

string

Optional. Specifies whether the job is allowed to create new tables. The following values are supported:

  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table.
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
write Disposition

string

Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:

  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the data, removes the constraints and uses the schema from the load job.
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table.
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result.

The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

null Marker

string

Optional. Specifies a string that represents a null value in a CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a null value when loading a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.

field Delimiter

string

Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence "\t" (U+0009) to specify a tab separator. The default value is comma (",", U+002C).

skip Leading Rows

integer

Optional. The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following:

  • skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row.
  • skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row.
  • skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
encoding

string

Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.

If you don't specify an encoding, or if you specify a UTF-8 encoding when the CSV file is not UTF-8 encoded, BigQuery attempts to convert the data to UTF-8. Generally, your data loads successfully, but it may not match byte-for-byte what you expect. To avoid this, specify the correct encoding by using the --encoding flag.

If BigQuery can't convert a character other than the ASCII 0 character, BigQuery converts the character to the standard Unicode replacement character: �.

quote

string

Optional. The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' " ', use ' "" '. @default "

max Bad Records

integer

Optional. The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This is only supported for CSV and NEWLINE_DELIMITED_JSON file formats.

schema Inline Format

string

[Deprecated] The format of the schemaInline property.

schema Inline

string

[Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".

allow Quoted Newlines

boolean

Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.

source Format

string

Optional. The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro, specify "AVRO". For parquet, specify "PARQUET". For orc, specify "ORC". The default value is CSV.

allow Jagged Rows

boolean

Optional. Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.

ignore Unknown Values

boolean

Optional. Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names in the table schema Avro, Parquet, ORC: Fields in the file schema that don't exist in the table schema.

projection Fields[]

string

If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.

autodetect

boolean

Optional. Indicates if we should automatically infer the options and schema for CSV and JSON sources.

schema Update Options[]

string

Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified:

  • ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
  • ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
time Partitioning

object ( TimePartitioning )

Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

range Partitioning

object ( RangePartitioning )

Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

clustering

object ( Clustering )

Clustering specification for the destination table.

destination Encryption Configuration

object ( EncryptionConfiguration )

Custom encryption configuration (e.g., Cloud KMS keys)

use Avro Logical Types

boolean

Optional. If sourceFormat is set to "AVRO", indicates whether to interpret logical types as the corresponding BigQuery data type (for example, TIMESTAMP), instead of using the raw type (for example, INTEGER).

reference File Schema Uri

string

Optional. The user can provide a reference file with the reader schema. This file is only loaded if it is part of source URIs, but is not loaded otherwise. It is enabled for the following formats: AVRO, PARQUET, ORC.

hive Partitioning Options

object ( HivePartitioningOptions )

Optional. When set, configures hive partitioning support. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error, as will providing an invalid specification.

decimal Target Types[]

enum ( DecimalTargetType )

Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown.

Example: Suppose the value of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is:

  • (38,9) -> NUMERIC;
  • (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits);
  • (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits);
  • (76,38) -> BIGNUMERIC;
  • (77,38) -> BIGNUMERIC (error if value exeeds supported range).

This field cannot contain duplicate types. The order of the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC.

Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] for the other file formats.

json Extension

enum ( JsonExtension )

Optional. Load option to be used together with sourceFormat newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and sourceFormat must be set to NEWLINE_DELIMITED_JSON).

parquet Options

object ( ParquetOptions )

Optional. Additional properties to set if sourceFormat is set to PARQUET.

preserve Ascii Control Characters

boolean

Optional. When sourceFormat is set to "CSV", this indicates whether the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\x00' to '\x1F') are preserved.

column Name Character Map

enum ( ColumnNameCharacterMap )

Optional. Character map supported for column names in CSV/Parquet loads. Defaults to STRICT and can be overridden by Project Config Service. Using this option with unsupporting load formats will result in an error.

copy Files Only

boolean

Optional. [Experimental] Configures the load job to copy files directly to the destination BigLake managed table, bypassing file content reading and rewriting.

Copying files only is supported when all the following are true:

  • sourceUris are located in the same Cloud Storage location as the destination table's storageUri location.
  • sourceFormat is PARQUET .
  • destinationTable is an existing BigLake managed table. The table's schema does not have flexible column names. The table's columns do not have type parameters other than precision and scale.
  • No options other than the above are specified.

DestinationTableProperties

Properties for the destination table.

JSON representation
 { 
 "friendlyName" 
 : 
 string 
 , 
 "description" 
 : 
 string 
 , 
 "labels" 
 : 
 { 
 string 
 : 
 string 
 , 
 ... 
 } 
 } 
Fields
friendly Name

string

Optional. Friendly name for the destination table. If the table already exists, it should be same as the existing friendly name.

description

string

Optional. The description for the destination table. This will only be used if the destination table is newly created. If the table already exists and a value different than the current description is provided, the job will fail.

labels

map (key: string, value: string)

Optional. The labels associated with this table. You can use these to organize and group your tables. This will only be used if the destination table is newly created. If the table already exists and labels are different than the current labels are provided, the job will fail.

ColumnNameCharacterMap

Indicates the character map used for column names.

Enums
COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED Unspecified column name character map.
STRICT Support flexible column name and reject invalid column names.
V1 Support alphanumeric + underscore characters and names must start with a letter or underscore. Invalid column names will be normalized.
V2 Support flexible column name. Invalid column names will be normalized.

JobConfigurationTableCopy

JobConfigurationTableCopy configures a job that copies data from one table to another. For more information on copying tables, see Copy a table .

JSON representation
 { 
 "sourceTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "sourceTables" 
 : 
 [ 
 { 
 object (  TableReference 
 
) 
 } 
 ] 
 , 
 "destinationTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "createDisposition" 
 : 
 string 
 , 
 "writeDisposition" 
 : 
 string 
 , 
 "destinationEncryptionConfiguration" 
 : 
 { 
 object (  EncryptionConfiguration 
 
) 
 } 
 , 
 "operationType" 
 : 
 enum (  OperationType 
 
) 
 , 
 "destinationExpirationTime" 
 : 
 string 
 } 
Fields
source Table

object ( TableReference )

[Pick one] Source table to copy.

source Tables[]

object ( TableReference )

[Pick one] Source tables to copy.

destination Table

object ( TableReference )

[Required] The destination table.

create Disposition

string

Optional. Specifies whether the job is allowed to create new tables. The following values are supported:

  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table.
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result.

The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

write Disposition

string

Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:

  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema and table constraints from the source table.
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table.
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result.

The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

destination Encryption Configuration

object ( EncryptionConfiguration )

Custom encryption configuration (e.g., Cloud KMS keys).

operation Type

enum ( OperationType )

Optional. Supported operation types in table copy job.

destination Expiration Time

string ( Timestamp format)

Optional. The time when the destination table expires. Expired tables will be deleted and their storage reclaimed.

OperationType

Indicates different operation types supported in table copy job.

Enums
OPERATION_TYPE_UNSPECIFIED Unspecified operation type.
COPY The source and destination table have the same table type.
SNAPSHOT The source table type is TABLE and the destination table type is SNAPSHOT.
RESTORE The source table type is SNAPSHOT and the destination table type is TABLE.
CLONE The source and destination table have the same table type, but only bill for unique data.

JobConfigurationExtract

JobConfigurationExtract configures a job that exports data from a BigQuery table into Google Cloud Storage.

JSON representation
 { 
 "destinationUri" 
 : 
 string 
 , 
 "destinationUris" 
 : 
 [ 
 string 
 ] 
 , 
 "printHeader" 
 : 
 boolean 
 , 
 "fieldDelimiter" 
 : 
 string 
 , 
 "destinationFormat" 
 : 
 string 
 , 
 "compression" 
 : 
 string 
 , 
 "useAvroLogicalTypes" 
 : 
 boolean 
 , 
 "modelExtractOptions" 
 : 
 { 
 object (  ModelExtractOptions 
 
) 
 } 
 , 
 // Union field source 
can be only one of the following: 
 "sourceTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "sourceModel" 
 : 
 { 
 object (  ModelReference 
 
) 
 } 
 // End of list of possible types for union field source 
. 
 } 
Fields
destination Uri

string

[Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.

destination Uris[]

string

[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.

print Header

boolean

Optional. Whether to print out a header row in the results. Default is true. Not applicable when extracting models.

field Delimiter

string

Optional. When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models.

destination Format

string

Optional. The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET, or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL.

compression

string

Optional. The compression type to use for exported files. Possible values include DEFLATE, GZIP, NONE, SNAPPY, and ZSTD. The default value is NONE. Not all compression formats are support for all file formats. DEFLATE is only supported for Avro. ZSTD is only supported for Parquet. Not applicable when extracting models.

use Avro Logical Types

boolean

Whether to use logical types when extracting to AVRO format. Not applicable when extracting models.

model Extract Options

object ( ModelExtractOptions )

Optional. Model extract options only applicable when extracting models.

Union field source . Required. Source reference for the export. source can be only one of the following:
source Table

object ( TableReference )

A reference to the table being exported.

source Model

object ( ModelReference )

A reference to the model being exported.

ModelExtractOptions

Options related to model extraction.

JSON representation
 { 
 "trialId" 
 : 
 string 
 } 
Fields
trial Id

string ( Int64Value format)

The 1-based ID of the trial to be exported from a hyperparameter tuning model. If not specified, the trial with id = Model .defaultTrialId is exported. This field is ignored for models not trained with hyperparameter tuning.

JobStatistics

Statistics for a single job execution.

JSON representation
 { 
 "creationTime" 
 : 
 string 
 , 
 "startTime" 
 : 
 string 
 , 
 "endTime" 
 : 
 string 
 , 
 "totalBytesProcessed" 
 : 
 string 
 , 
 "completionRatio" 
 : 
 number 
 , 
 "quotaDeferments" 
 : 
 [ 
 string 
 ] 
 , 
 "query" 
 : 
 { 
 object (  JobStatistics2 
 
) 
 } 
 , 
 "load" 
 : 
 { 
 object (  JobStatistics3 
 
) 
 } 
 , 
 "extract" 
 : 
 { 
 object (  JobStatistics4 
 
) 
 } 
 , 
 "copy" 
 : 
 { 
 object (  CopyJobStatistics 
 
) 
 } 
 , 
 "totalSlotMs" 
 : 
 string 
 , 
 "reservationUsage" 
 : 
 [ 
 { 
 "name" 
 : 
 string 
 , 
 "slotMs" 
 : 
 string 
 } 
 ] 
 , 
 "reservation_id" 
 : 
 string 
 , 
 "numChildJobs" 
 : 
 string 
 , 
 "parentJobId" 
 : 
 string 
 , 
 "scriptStatistics" 
 : 
 { 
 object (  ScriptStatistics 
 
) 
 } 
 , 
 "rowLevelSecurityStatistics" 
 : 
 { 
 object (  RowLevelSecurityStatistics 
 
) 
 } 
 , 
 "dataMaskingStatistics" 
 : 
 { 
 object (  DataMaskingStatistics 
 
) 
 } 
 , 
 "transactionInfo" 
 : 
 { 
 object (  TransactionInfo 
 
) 
 } 
 , 
 "sessionInfo" 
 : 
 { 
 object (  SessionInfo 
 
) 
 } 
 , 
 "finalExecutionDurationMs" 
 : 
 string 
 , 
 "edition" 
 : 
 enum (  ReservationEdition 
 
) 
 } 
Fields
creation Time

string ( int64 format)

Output only. Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.

start Time

string ( int64 format)

Output only. Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.

end Time

string ( int64 format)

Output only. End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.

total Bytes Processed

string ( Int64Value format)

Output only. Total bytes processed for the job.

completion Ratio

number

Output only. [TrustedTester] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs.

quota Deferments[]

string

Output only. Quotas which delayed this job's start time.

query

object ( JobStatistics2 )

Output only. Statistics for a query job.

load

object ( JobStatistics3 )

Output only. Statistics for a load job.

extract

object ( JobStatistics4 )

Output only. Statistics for an extract job.

copy

object ( CopyJobStatistics )

Output only. Statistics for a copy job.

total Slot Ms

string ( Int64Value format)

Output only. Slot-milliseconds for the job.

reservationUsage[]
(deprecated)

object

Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated.

reservationUsage[]
(deprecated) .name

string

Reservation name or "unreserved" for on-demand resource usage and multi-statement queries.

reservationUsage[]
(deprecated) .slotMs

string ( Int64Value format)

Total slot milliseconds used by the reservation for a particular job.

reservation_ id

string

Output only. Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job.

num Child Jobs

string ( int64 format)

Output only. Number of child jobs executed.

parent Job Id

string

Output only. If this is a child job, specifies the job ID of the parent.

script Statistics

object ( ScriptStatistics )

Output only. If this a child job of a script, specifies information about the context of this job within the script.

row Level Security Statistics

object ( RowLevelSecurityStatistics )

Output only. Statistics for row-level security. Present only for query and extract jobs.

data Masking Statistics

object ( DataMaskingStatistics )

Output only. Statistics for data-masking. Present only for query and extract jobs.

transaction Info

object ( TransactionInfo )

Output only. [Alpha] Information of the multi-statement transaction if this job is part of one.

This property is only expected on a child job or a job that is in a session. A script parent job is not part of the transaction started in the script.

session Info

object ( SessionInfo )

Output only. Information of the session if this job is part of one.

final Execution Duration Ms

string ( int64 format)

Output only. The duration in milliseconds of the execution of the final attempt of this job, as BigQuery may internally re-attempt to execute the job.

edition

enum ( ReservationEdition )

Output only. Name of edition corresponding to the reservation for this job at the time of this update.

JobStatistics2

Statistics for a query job.

JSON representation
 { 
 "queryPlan" 
 : 
 [ 
 { 
 object (  ExplainQueryStage 
 
) 
 } 
 ] 
 , 
 "estimatedBytesProcessed" 
 : 
 string 
 , 
 "timeline" 
 : 
 [ 
 { 
 object (  QueryTimelineSample 
 
) 
 } 
 ] 
 , 
 "totalPartitionsProcessed" 
 : 
 string 
 , 
 "totalBytesProcessed" 
 : 
 string 
 , 
 "totalBytesProcessedAccuracy" 
 : 
 string 
 , 
 "totalBytesBilled" 
 : 
 string 
 , 
 "billingTier" 
 : 
 integer 
 , 
 "totalSlotMs" 
 : 
 string 
 , 
 "reservationUsage" 
 : 
 [ 
 { 
 "name" 
 : 
 string 
 , 
 "slotMs" 
 : 
 string 
 } 
 ] 
 , 
 "cacheHit" 
 : 
 boolean 
 , 
 "referencedTables" 
 : 
 [ 
 { 
 object (  TableReference 
 
) 
 } 
 ] 
 , 
 "referencedRoutines" 
 : 
 [ 
 { 
 object (  RoutineReference 
 
) 
 } 
 ] 
 , 
 "schema" 
 : 
 { 
 object (  TableSchema 
 
) 
 } 
 , 
 "numDmlAffectedRows" 
 : 
 string 
 , 
 "dmlStats" 
 : 
 { 
 object (  DmlStats 
 
) 
 } 
 , 
 "undeclaredQueryParameters" 
 : 
 [ 
 { 
 object (  QueryParameter 
 
) 
 } 
 ] 
 , 
 "statementType" 
 : 
 string 
 , 
 "ddlOperationPerformed" 
 : 
 string 
 , 
 "ddlTargetTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "ddlDestinationTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "ddlTargetRowAccessPolicy" 
 : 
 { 
 object (  RowAccessPolicyReference 
 
) 
 } 
 , 
 "ddlAffectedRowAccessPolicyCount" 
 : 
 string 
 , 
 "ddlTargetRoutine" 
 : 
 { 
 object (  RoutineReference 
 
) 
 } 
 , 
 "ddlTargetDataset" 
 : 
 { 
 object (  DatasetReference 
 
) 
 } 
 , 
 "mlStatistics" 
 : 
 { 
 object (  MlStatistics 
 
) 
 } 
 , 
 "exportDataStatistics" 
 : 
 { 
 object (  ExportDataStatistics 
 
) 
 } 
 , 
 "externalServiceCosts" 
 : 
 [ 
 { 
 object (  ExternalServiceCost 
 
) 
 } 
 ] 
 , 
 "biEngineStatistics" 
 : 
 { 
 object (  BiEngineStatistics 
 
) 
 } 
 , 
 "loadQueryStatistics" 
 : 
 { 
 object (  LoadQueryStatistics 
 
) 
 } 
 , 
 "dclTargetTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "dclTargetView" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "dclTargetDataset" 
 : 
 { 
 object (  DatasetReference 
 
) 
 } 
 , 
 "searchStatistics" 
 : 
 { 
 object (  SearchStatistics 
 
) 
 } 
 , 
 "vectorSearchStatistics" 
 : 
 { 
 object (  VectorSearchStatistics 
 
) 
 } 
 , 
 "performanceInsights" 
 : 
 { 
 object (  PerformanceInsights 
 
) 
 } 
 , 
 "queryInfo" 
 : 
 { 
 object (  QueryInfo 
 
) 
 } 
 , 
 "sparkStatistics" 
 : 
 { 
 object (  SparkStatistics 
 
) 
 } 
 , 
 "transferredBytes" 
 : 
 string 
 , 
 "materializedViewStatistics" 
 : 
 { 
 object (  MaterializedViewStatistics 
 
) 
 } 
 , 
 "metadataCacheStatistics" 
 : 
 { 
 object (  MetadataCacheStatistics 
 
) 
 } 
 } 
Fields
query Plan[]

object ( ExplainQueryStage )

Output only. Describes execution plan for the query.

estimated Bytes Processed

string ( Int64Value format)

Output only. The original estimate of bytes processed for the job.

timeline[]

object ( QueryTimelineSample )

Output only. Describes a timeline of job execution.

total Partitions Processed

string ( Int64Value format)

Output only. Total number of partitions processed from all partitioned tables referenced in the job.

total Bytes Processed

string ( Int64Value format)

Output only. Total bytes processed for the job.

total Bytes Processed Accuracy

string

Output only. For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost.

total Bytes Billed

string ( Int64Value format)

Output only. If the project is configured to use on-demand pricing, then this field contains the total bytes billed for the job. If the project is configured to use flat-rate pricing, then you are not billed for bytes and this field is informational only.

billing Tier

integer

Output only. Billing tier for the job. This is a BigQuery-specific concept which is not related to the Google Cloud notion of "free tier". The value here is a measure of the query's resource consumption relative to the amount of data scanned. For on-demand queries, the limit is 100, and all queries within this limit are billed at the standard on-demand rates. On-demand queries that exceed this limit will fail with a billingTierLimitExceeded error.

total Slot Ms

string ( Int64Value format)

Output only. Slot-milliseconds for the job.

reservationUsage[]
(deprecated)

object

Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated.

reservationUsage[]
(deprecated) .name

string

Reservation name or "unreserved" for on-demand resource usage and multi-statement queries.

reservationUsage[]
(deprecated) .slotMs

string ( Int64Value format)

Total slot milliseconds used by the reservation for a particular job.

cache Hit

boolean

Output only. Whether the query result was fetched from the query cache.

referenced Tables[]

object ( TableReference )

Output only. Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.

referenced Routines[]

object ( RoutineReference )

Output only. Referenced routines for the job.

schema

object ( TableSchema )

Output only. The schema of the results. Present only for successful dry run of non-legacy SQL queries.

num Dml Affected Rows

string ( Int64Value format)

Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.

dml Stats

object ( DmlStats )

Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE.

undeclared Query Parameters[]

object ( QueryParameter )

Output only. GoogleSQL only: list of undeclared query parameters detected during a dry run validation.

statement Type

string

Output only. The type of query statement, if valid. Possible values:

ddl Operation Performed

string

Output only. The DDL operation performed, possibly dependent on the pre-existence of the DDL target.

ddl Target Table

object ( TableReference )

Output only. The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.

ddl Destination Table

object ( TableReference )

Output only. The table after rename. Present only for ALTER TABLE RENAME TO query.

ddl Target Row Access Policy

object ( RowAccessPolicyReference )

Output only. The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.

ddl Affected Row Access Policy Count

string ( Int64Value format)

Output only. The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.

ddl Target Routine

object ( RoutineReference )

Output only. [Beta] The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.

ddl Target Dataset

object ( DatasetReference )

Output only. The DDL target dataset. Present only for CREATE/ALTER/DROP SCHEMA(dataset) queries.

ml Statistics

object ( MlStatistics )

Output only. Statistics of a BigQuery ML training job.

export Data Statistics

object ( ExportDataStatistics )

Output only. Stats for EXPORT DATA statement.

external Service Costs[]

object ( ExternalServiceCost )

Output only. Job cost breakdown as bigquery internal cost and external service costs.

bi Engine Statistics

object ( BiEngineStatistics )

Output only. BI Engine specific Statistics.

load Query Statistics

object ( LoadQueryStatistics )

Output only. Statistics for a LOAD query.

dcl Target Table

object ( TableReference )

Output only. Referenced table for DCL statement.

dcl Target View

object ( TableReference )

Output only. Referenced view for DCL statement.

dcl Target Dataset

object ( DatasetReference )

Output only. Referenced dataset for DCL statement.

search Statistics

object ( SearchStatistics )

Output only. Search query specific statistics.

vector Search Statistics

object ( VectorSearchStatistics )

Output only. Vector Search query specific statistics.

performance Insights

object ( PerformanceInsights )

Output only. Performance insights.

query Info

object ( QueryInfo )

Output only. jobs.query optimization information for a QUERY job.

spark Statistics

object ( SparkStatistics )

Output only. Statistics of a Spark procedure job.

transferred Bytes

string ( Int64Value format)

Output only. Total bytes transferred for cross-cloud queries such as Cross Cloud Transfer and CREATE TABLE AS SELECT (CTAS).

materialized View Statistics

object ( MaterializedViewStatistics )

Output only. Statistics of materialized views of a query job.

ExplainQueryStage

A single stage of query execution.

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "id" 
 : 
 string 
 , 
 "startMs" 
 : 
 string 
 , 
 "endMs" 
 : 
 string 
 , 
 "inputStages" 
 : 
 [ 
 string 
 ] 
 , 
 "waitRatioAvg" 
 : 
 number 
 , 
 "waitMsAvg" 
 : 
 string 
 , 
 "waitRatioMax" 
 : 
 number 
 , 
 "waitMsMax" 
 : 
 string 
 , 
 "readRatioAvg" 
 : 
 number 
 , 
 "readMsAvg" 
 : 
 string 
 , 
 "readRatioMax" 
 : 
 number 
 , 
 "readMsMax" 
 : 
 string 
 , 
 "computeRatioAvg" 
 : 
 number 
 , 
 "computeMsAvg" 
 : 
 string 
 , 
 "computeRatioMax" 
 : 
 number 
 , 
 "computeMsMax" 
 : 
 string 
 , 
 "writeRatioAvg" 
 : 
 number 
 , 
 "writeMsAvg" 
 : 
 string 
 , 
 "writeRatioMax" 
 : 
 number 
 , 
 "writeMsMax" 
 : 
 string 
 , 
 "shuffleOutputBytes" 
 : 
 string 
 , 
 "shuffleOutputBytesSpilled" 
 : 
 string 
 , 
 "recordsRead" 
 : 
 string 
 , 
 "recordsWritten" 
 : 
 string 
 , 
 "parallelInputs" 
 : 
 string 
 , 
 "completedParallelInputs" 
 : 
 string 
 , 
 "status" 
 : 
 string 
 , 
 "steps" 
 : 
 [ 
 { 
 object (  ExplainQueryStep 
 
) 
 } 
 ] 
 , 
 "slotMs" 
 : 
 string 
 , 
 "computeMode" 
 : 
 enum (  ComputeMode 
 
) 
 } 
Fields
name

string

Human-readable name for the stage.

id

string ( Int64Value format)

Unique ID for the stage within the plan.

start Ms

string ( int64 format)

Stage start time represented as milliseconds since the epoch.

end Ms

string ( int64 format)

Stage end time represented as milliseconds since the epoch.

input Stages[]

string ( int64 format)

IDs for stages that are inputs to this stage.

wait Ratio Avg

number

Relative amount of time the average shard spent waiting to be scheduled.

wait Ms Avg

string ( Int64Value format)

Milliseconds the average shard spent waiting to be scheduled.

wait Ratio Max

number

Relative amount of time the slowest shard spent waiting to be scheduled.

wait Ms Max

string ( Int64Value format)

Milliseconds the slowest shard spent waiting to be scheduled.

read Ratio Avg

number

Relative amount of time the average shard spent reading input.

read Ms Avg

string ( Int64Value format)

Milliseconds the average shard spent reading input.

read Ratio Max

number

Relative amount of time the slowest shard spent reading input.

read Ms Max

string ( Int64Value format)

Milliseconds the slowest shard spent reading input.

compute Ratio Avg

number

Relative amount of time the average shard spent on CPU-bound tasks.

compute Ms Avg

string ( Int64Value format)

Milliseconds the average shard spent on CPU-bound tasks.

compute Ratio Max

number

Relative amount of time the slowest shard spent on CPU-bound tasks.

compute Ms Max

string ( Int64Value format)

Milliseconds the slowest shard spent on CPU-bound tasks.

write Ratio Avg

number

Relative amount of time the average shard spent on writing output.

write Ms Avg

string ( Int64Value format)

Milliseconds the average shard spent on writing output.

write Ratio Max

number

Relative amount of time the slowest shard spent on writing output.

write Ms Max

string ( Int64Value format)

Milliseconds the slowest shard spent on writing output.

shuffle Output Bytes

string ( Int64Value format)

Total number of bytes written to shuffle.

shuffle Output Bytes Spilled

string ( Int64Value format)

Total number of bytes written to shuffle and spilled to disk.

records Read

string ( Int64Value format)

Number of records read into the stage.

records Written

string ( Int64Value format)

Number of records written by the stage.

parallel Inputs

string ( Int64Value format)

Number of parallel input segments to be processed

completed Parallel Inputs

string ( Int64Value format)

Number of parallel input segments completed.

status

string

Current status for this stage.

steps[]

object ( ExplainQueryStep )

tabledata.list of operations within the stage in dependency order (approximately chronological).

slot Ms

string ( Int64Value format)

Slot-milliseconds used by the stage.

compute Mode

enum ( ComputeMode )

Output only. Compute mode for this stage.

ExplainQueryStep

An operation within a stage.

JSON representation
 { 
 "kind" 
 : 
 string 
 , 
 "substeps" 
 : 
 [ 
 string 
 ] 
 } 
Fields
kind

string

Machine-readable operation type.

substeps[]

string

Human-readable description of the step(s).

ComputeMode

Indicates the type of compute mode.

Enums
COMPUTE_MODE_UNSPECIFIED ComputeMode type not specified.
BIGQUERY This stage was processed using BigQuery slots.
BI_ENGINE This stage was processed using BI Engine compute.

QueryTimelineSample

Summary of the state of query execution at a given time.

JSON representation
 { 
 "elapsedMs" 
 : 
 string 
 , 
 "totalSlotMs" 
 : 
 string 
 , 
 "pendingUnits" 
 : 
 string 
 , 
 "completedUnits" 
 : 
 string 
 , 
 "activeUnits" 
 : 
 string 
 , 
 "estimatedRunnableUnits" 
 : 
 string 
 } 
Fields
elapsed Ms

string ( Int64Value format)

Milliseconds elapsed since the start of query execution.

total Slot Ms

string ( Int64Value format)

Cumulative slot-ms consumed by the query.

pending Units

string ( Int64Value format)

Total units of work remaining for the query. This number can be revised (increased or decreased) while the query is running.

completed Units

string ( Int64Value format)

Total parallel units of work completed by this query.

active Units

string ( Int64Value format)

Total number of active workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample.

estimated Runnable Units

string ( Int64Value format)

Units of work that can be scheduled immediately. Providing additional slots for these units of work will accelerate the query, if no other query in the reservation needs additional slots.

MlStatistics

Job statistics specific to a BigQuery ML training job.

JSON representation
 { 
 "maxIterations" 
 : 
 string 
 , 
 "iterationResults" 
 : 
 [ 
 { 
 object (  IterationResult 
 
) 
 } 
 ] 
 , 
 "modelType" 
 : 
 enum (  ModelType 
 
) 
 , 
 "trainingType" 
 : 
 enum (  TrainingType 
 
) 
 , 
 "hparamTrials" 
 : 
 [ 
 { 
 object (  HparamTuningTrial 
 
) 
 } 
 ] 
 } 
Fields
max Iterations

string ( int64 format)

Output only. Maximum number of iterations specified as maxIterations in the 'CREATE MODEL' query. The actual number of iterations may be less than this number due to early stop.

iteration Results[]

object ( IterationResult )

Results for all completed iterations. Empty for hyperparameter tuning jobs .

model Type

enum ( ModelType )

Output only. The type of the model that is being trained.

training Type

enum ( TrainingType )

Output only. Training type of the job.

hparam Trials[]

object ( HparamTuningTrial )

Output only. Trials of a hyperparameter tuning job sorted by trialId.

TrainingType

Training type.

Enums
TRAINING_TYPE_UNSPECIFIED Unspecified training type.
SINGLE_TRAINING Single training with fixed parameter space.
HPARAM_TUNING Hyperparameter tuning training .

ExportDataStatistics

Statistics for the EXPORT DATA statement as part of jobs.query Job. EXTRACT JOB statistics are populated in JobStatistics4.

JSON representation
 { 
 "fileCount" 
 : 
 string 
 , 
 "rowCount" 
 : 
 string 
 } 
Fields
file Count

string ( Int64Value format)

Number of destination files generated in case of EXPORT DATA statement only.

row Count

string ( Int64Value format)

[Alpha] Number of destination rows generated in case of EXPORT DATA statement only.

ExternalServiceCost

The external service cost is a portion of the total cost, these costs are not additive with totalBytesBilled. Moreover, this field only track external service costs that will show up as BigQuery costs (e.g. training BigQuery ML job with google cloud CAIP or Automl Tables services), not other costs which may be accrued by running the query (e.g. reading from Bigtable or Cloud Storage). The external service costs with different billing sku (e.g. CAIP job is charged based on VM usage) are converted to BigQuery billed_bytes and slotMs with equivalent amount of US dollars. Services may not directly correlate to these metrics, but these are the equivalents for billing purposes. Output only.

JSON representation
 { 
 "externalService" 
 : 
 string 
 , 
 "bytesProcessed" 
 : 
 string 
 , 
 "bytesBilled" 
 : 
 string 
 , 
 "slotMs" 
 : 
 string 
 , 
 "reservedSlotCount" 
 : 
 string 
 } 
Fields
external Service

string

External service name.

bytes Processed

string ( Int64Value format)

External service cost in terms of bigquery bytes processed.

bytes Billed

string ( Int64Value format)

External service cost in terms of bigquery bytes billed.

slot Ms

string ( Int64Value format)

External service cost in terms of bigquery slot milliseconds.

reserved Slot Count

string ( int64 format)

Non-preemptable reserved slots used for external job. For example, reserved slots for Cloua AI Platform job are the VM usages converted to BigQuery slot with equivalent mount of price.

BiEngineStatistics

Statistics for a BI Engine specific query. Populated as part of JobStatistics2

JSON representation
 { 
 "biEngineMode" 
 : 
 enum (  BiEngineMode 
 
) 
 , 
 "accelerationMode" 
 : 
 enum (  BiEngineAccelerationMode 
 
) 
 , 
 "biEngineReasons" 
 : 
 [ 
 { 
 object (  BiEngineReason 
 
) 
 } 
 ] 
 } 
Fields
bi Engine Mode

enum ( BiEngineMode )

Output only. Specifies which mode of BI Engine acceleration was performed (if any).

acceleration Mode

enum ( BiEngineAccelerationMode )

Output only. Specifies which mode of BI Engine acceleration was performed (if any).

bi Engine Reasons[]

object ( BiEngineReason )

In case of DISABLED or PARTIAL biEngineMode, these contain the explanatory reasons as to why BI Engine could not accelerate. In case the full query was accelerated, this field is not populated.

BiEngineMode

Indicates the type of BI Engine acceleration.

Enums
ACCELERATION_MODE_UNSPECIFIED BiEngineMode type not specified.
DISABLED BI Engine disabled the acceleration. biEngineReasons specifies a more detailed reason.
PARTIAL Part of the query was accelerated using BI Engine. See biEngineReasons for why parts of the query were not accelerated.
FULL All of the query was accelerated using BI Engine.

BiEngineAccelerationMode

Indicates the type of BI Engine acceleration.

Enums
BI_ENGINE_ACCELERATION_MODE_UNSPECIFIED BiEngineMode type not specified.
BI_ENGINE_DISABLED BI Engine acceleration was attempted but disabled. biEngineReasons specifies a more detailed reason.
PARTIAL_INPUT Some inputs were accelerated using BI Engine. See biEngineReasons for why parts of the query were not accelerated.
FULL_INPUT All of the query inputs were accelerated using BI Engine.
FULL_QUERY All of the query was accelerated using BI Engine.

BiEngineReason

Reason why BI Engine didn't accelerate the query (or sub-query).

JSON representation
 { 
 "code" 
 : 
 enum (  Code 
 
) 
 , 
 "message" 
 : 
 string 
 } 
Fields
code

enum ( Code )

Output only. High-level BI Engine reason for partial or disabled acceleration

message

string

Output only. Free form human-readable reason for partial or disabled acceleration.

Code

Indicates the high-level reason for no/partial acceleration

Enums
CODE_UNSPECIFIED BiEngineReason not specified.
NO_RESERVATION No reservation available for BI Engine acceleration.
INSUFFICIENT_RESERVATION Not enough memory available for BI Engine acceleration.
UNSUPPORTED_SQL_TEXT This particular SQL text is not supported for acceleration by BI Engine.
INPUT_TOO_LARGE Input too large for acceleration by BI Engine.
OTHER_REASON Catch-all code for all other cases for partial or disabled acceleration.
TABLE_EXCLUDED One or more tables were not eligible for BI Engine acceleration.

LoadQueryStatistics

Statistics for a LOAD query.

JSON representation
 { 
 "inputFiles" 
 : 
 string 
 , 
 "inputFileBytes" 
 : 
 string 
 , 
 "outputRows" 
 : 
 string 
 , 
 "outputBytes" 
 : 
 string 
 , 
 "badRecords" 
 : 
 string 
 , 
 "bytesTransferred" 
 : 
 string 
 } 
Fields
input Files

string ( Int64Value format)

Output only. Number of source files in a LOAD query.

input File Bytes

string ( Int64Value format)

Output only. Number of bytes of source data in a LOAD query.

output Rows

string ( Int64Value format)

Output only. Number of rows imported in a LOAD query. Note that while a LOAD query is in the running state, this value may change.

output Bytes

string ( Int64Value format)

Output only. Size of the loaded data in bytes. Note that while a LOAD query is in the running state, this value may change.

bad Records

string ( Int64Value format)

Output only. The number of bad records encountered while processing a LOAD query. Note that if the job has failed because of more bad records encountered than the maximum allowed in the load job configuration, then this number can be less than the total number of bad records present in the input data.

bytesTransferred
(deprecated)

string ( Int64Value format)

Output only. This field is deprecated. The number of bytes of source data copied over the network for a LOAD query. transferredBytes has the canonical value for physical transferred bytes, which is used for BigQuery Omni billing.

SearchStatistics

Statistics for a search query. Populated as part of JobStatistics2.

JSON representation
 { 
 "indexUsageMode" 
 : 
 enum (  IndexUsageMode 
 
) 
 , 
 "indexUnusedReasons" 
 : 
 [ 
 { 
 object (  IndexUnusedReason 
 
) 
 } 
 ] 
 } 
Fields
index Usage Mode

enum ( IndexUsageMode )

Specifies the index usage mode for the query.

index Unused Reasons[]

object ( IndexUnusedReason )

When indexUsageMode is UNUSED or PARTIALLY_USED , this field explains why indexes were not used in all or part of the search query. If indexUsageMode is FULLY_USED , this field is not populated.

IndexUsageMode

Indicates the type of search index usage in the entire search query.

Enums
INDEX_USAGE_MODE_UNSPECIFIED Index usage mode not specified.
UNUSED No search indexes were used in the search query. See indexUnusedReasons for detailed reasons.
PARTIALLY_USED Part of the search query used search indexes. See indexUnusedReasons for why other parts of the query did not use search indexes.
FULLY_USED The entire search query used search indexes.

IndexUnusedReason

Reason about why no search index was used in the search query (or sub-query).

JSON representation
 { 
 "code" 
 : 
 enum (  Code 
 
) 
 , 
 "message" 
 : 
 string 
 , 
 "baseTable" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "indexName" 
 : 
 string 
 } 
Fields
code

enum ( Code )

Specifies the high-level reason for the scenario when no search index was used.

message

string

Free form human-readable reason for the scenario when no search index was used.

base Table

object ( TableReference )

Specifies the base table involved in the reason that no search index was used.

index Name

string

Specifies the name of the unused search index, if available.

Code

Indicates the high-level reason for the scenario when no search index was used.

Enums
CODE_UNSPECIFIED Code not specified.
INDEX_CONFIG_NOT_AVAILABLE Indicates the search index configuration has not been created.
PENDING_INDEX_CREATION Indicates the search index creation has not been completed.
BASE_TABLE_TRUNCATED Indicates the base table has been truncated (rows have been removed from table with TRUNCATE TABLE statement) since the last time the search index was refreshed.
INDEX_CONFIG_MODIFIED Indicates the search index configuration has been changed since the last time the search index was refreshed.
TIME_TRAVEL_QUERY Indicates the search query accesses data at a timestamp before the last time the search index was refreshed.
NO_PRUNING_POWER Indicates the usage of search index will not contribute to any pruning improvement for the search function, e.g. when the search predicate is in a disjunction with other non-search predicates.
UNINDEXED_SEARCH_FIELDS Indicates the search index does not cover all fields in the search function.
UNSUPPORTED_SEARCH_PATTERN Indicates the search index does not support the given search query pattern.
OPTIMIZED_WITH_MATERIALIZED_VIEW Indicates the query has been optimized by using a materialized view.
SECURED_BY_DATA_MASKING Indicates the query has been secured by data masking, and thus search indexes are not applicable.
MISMATCHED_TEXT_ANALYZER Indicates that the search index and the search function call do not have the same text analyzer.
BASE_TABLE_TOO_SMALL Indicates the base table is too small (below a certain threshold). The index does not provide noticeable search performance gains when the base table is too small.
BASE_TABLE_TOO_LARGE

Indicates that the total size of indexed base tables in your organization exceeds your region's limit and the index is not used in the query. To index larger base tables, you can use your own reservation for index-management jobs.

ESTIMATED_PERFORMANCE_GAIN_TOO_LOW Indicates that the estimated performance gain from using the search index is too low for the given search query.
INDEX_SUPPRESSED_BY_FUNCTION_OPTION Indicates that an option in the search function that cannot make use of the index has been selected.
QUERY_CACHE_HIT Indicates that the query was cached, and thus the search index was not used.
STALE_INDEX The index cannot be used in the search query because it is stale.
INTERNAL_ERROR Indicates an internal error that causes the search index to be unused.
OTHER_REASON Indicates that the reason search indexes cannot be used in the query is not covered by any of the other IndexUnusedReason options.

VectorSearchStatistics

Statistics for a vector search query. Populated as part of JobStatistics2.

JSON representation
 { 
 "indexUsageMode" 
 : 
 enum (  IndexUsageMode 
 
) 
 , 
 "indexUnusedReasons" 
 : 
 [ 
 { 
 object (  IndexUnusedReason 
 
) 
 } 
 ] 
 } 
Fields
index Usage Mode

enum ( IndexUsageMode )

Specifies the index usage mode for the query.

index Unused Reasons[]

object ( IndexUnusedReason )

When indexUsageMode is UNUSED or PARTIALLY_USED , this field explains why indexes were not used in all or part of the vector search query. If indexUsageMode is FULLY_USED , this field is not populated.

IndexUsageMode

Indicates the type of vector index usage in the entire vector search query.

Enums
INDEX_USAGE_MODE_UNSPECIFIED Index usage mode not specified.
UNUSED No vector indexes were used in the vector search query. See indexUnusedReasons for detailed reasons.
PARTIALLY_USED Part of the vector search query used vector indexes. See indexUnusedReasons for why other parts of the query did not use vector indexes.
FULLY_USED The entire vector search query used vector indexes.

PerformanceInsights

Performance insights for the job.

JSON representation
 { 
 "avgPreviousExecutionMs" 
 : 
 string 
 , 
 "stagePerformanceStandaloneInsights" 
 : 
 [ 
 { 
 object (  StagePerformanceStandaloneInsight 
 
) 
 } 
 ] 
 , 
 "stagePerformanceChangeInsights" 
 : 
 [ 
 { 
 object (  StagePerformanceChangeInsight 
 
) 
 } 
 ] 
 } 
Fields
avg Previous Execution Ms

string ( int64 format)

Output only. Average execution ms of previous runs. Indicates the job ran slow compared to previous executions. To find previous executions, use INFORMATION_SCHEMA tables and filter jobs with same query hash.

stage Performance Standalone Insights[]

object ( StagePerformanceStandaloneInsight )

Output only. Standalone query stage performance insights, for exploring potential improvements.

stage Performance Change Insights[]

object ( StagePerformanceChangeInsight )

Output only. jobs.query stage performance insights compared to previous runs, for diagnosing performance regression.

StagePerformanceStandaloneInsight

Standalone performance insights for a specific stage.

JSON representation
 { 
 "stageId" 
 : 
 string 
 , 
 "biEngineReasons" 
 : 
 [ 
 { 
 object (  BiEngineReason 
 
) 
 } 
 ] 
 , 
 "highCardinalityJoins" 
 : 
 [ 
 { 
 object (  HighCardinalityJoin 
 
) 
 } 
 ] 
 , 
 "slotContention" 
 : 
 boolean 
 , 
 "insufficientShuffleQuota" 
 : 
 boolean 
 , 
 "partitionSkew" 
 : 
 { 
 object (  PartitionSkew 
 
) 
 } 
 } 
Fields
stage Id

string ( int64 format)

Output only. The stage id that the insight mapped to.

bi Engine Reasons[]

object ( BiEngineReason )

Output only. If present, the stage had the following reasons for being disqualified from BI Engine execution.

high Cardinality Joins[]

object ( HighCardinalityJoin )

Output only. High cardinality joins in the stage.

slot Contention

boolean

Output only. True if the stage has a slot contention issue.

insufficient Shuffle Quota

boolean

Output only. True if the stage has insufficient shuffle quota.

partition Skew

object ( PartitionSkew )

Output only. Partition skew in the stage.

HighCardinalityJoin

High cardinality join detailed information.

JSON representation
 { 
 "leftRows" 
 : 
 string 
 , 
 "rightRows" 
 : 
 string 
 , 
 "outputRows" 
 : 
 string 
 , 
 "stepIndex" 
 : 
 integer 
 } 
Fields
left Rows

string ( int64 format)

Output only. Count of left input rows.

right Rows

string ( int64 format)

Output only. Count of right input rows.

output Rows

string ( int64 format)

Output only. Count of the output rows.

step Index

integer

Output only. The index of the join operator in the ExplainQueryStep lists.

PartitionSkew

Partition skew detailed information.

JSON representation
 { 
 "skewSources" 
 : 
 [ 
 { 
 object (  SkewSource 
 
) 
 } 
 ] 
 } 
Fields
skew Sources[]

object ( SkewSource )

Output only. Source stages which produce skewed data.

SkewSource

Details about source stages which produce skewed data.

JSON representation
 { 
 "stageId" 
 : 
 string 
 } 
Fields
stage Id

string ( int64 format)

Output only. Stage id of the skew source stage.

StagePerformanceChangeInsight

Performance insights compared to the previous executions for a specific stage.

JSON representation
 { 
 "stageId" 
 : 
 string 
 , 
 "inputDataChange" 
 : 
 { 
 object (  InputDataChange 
 
) 
 } 
 } 
Fields
stage Id

string ( int64 format)

Output only. The stage id that the insight mapped to.

input Data Change

object ( InputDataChange )

Output only. Input data change insight of the query stage.

InputDataChange

Details about the input data change insight.

JSON representation
 { 
 "recordsReadDiffPercentage" 
 : 
 number 
 } 
Fields
records Read Diff Percentage

number

Output only. Records read difference percentage compared to a previous run.

QueryInfo

jobs.query optimization information for a QUERY job.

JSON representation
 { 
 "optimizationDetails" 
 : 
 { 
 object 
 } 
 } 
Fields
optimization Details

object ( Struct format)

Output only. Information about query optimizations.

SparkStatistics

Statistics for a BigSpark query. Populated as part of JobStatistics2

JSON representation
 { 
 "endpoints" 
 : 
 { 
 string 
 : 
 string 
 , 
 ... 
 } 
 , 
 "sparkJobId" 
 : 
 string 
 , 
 "sparkJobLocation" 
 : 
 string 
 , 
 "loggingInfo" 
 : 
 { 
 object (  LoggingInfo 
 
) 
 } 
 , 
 "kmsKeyName" 
 : 
 string 
 , 
 "gcsStagingBucket" 
 : 
 string 
 } 
Fields
endpoints

map (key: string, value: string)

Output only. Endpoints returned from Dataproc. Key list: - history_server_endpoint: A link to Spark job UI.

spark Job Id

string

Output only. Spark job ID if a Spark job is created successfully.

spark Job Location

string

Output only. Location where the Spark job is executed. A location is selected by BigQueury for jobs configured to run in a multi-region.

logging Info

object ( LoggingInfo )

Output only. Logging info is used to generate a link to Cloud Logging.

kms Key Name

string

Output only. The Cloud KMS encryption key that is used to protect the resources created by the Spark job. If the Spark procedure uses the invoker security mode, the Cloud KMS encryption key is either inferred from the provided system variable, @@spark_proc_properties.kms_key_name , or the default key of the BigQuery job's project (if the CMEK organization policy is enforced). Otherwise, the Cloud KMS key is either inferred from the Spark connection associated with the procedure (if it is provided), or from the default key of the Spark connection's project if the CMEK organization policy is enforced.

Example:

  • projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]
gcs Staging Bucket

string

Output only. The Google Cloud Storage bucket that is used as the default file system by the Spark application. This field is only filled when the Spark procedure uses the invoker security mode. The gcsStagingBucket bucket is inferred from the @@spark_proc_properties.staging_bucket system variable (if it is provided). Otherwise, BigQuery creates a default staging bucket for the job and returns the bucket name in this field.

Example:

  • gs://[bucketName]

LoggingInfo

Spark job logs can be filtered by these fields in Cloud Logging.

JSON representation
 { 
 "resourceType" 
 : 
 string 
 , 
 "projectId" 
 : 
 string 
 } 
Fields
resource Type

string

Output only. Resource type used for logging.

project Id

string

Output only. Project ID where the Spark logs were written.

MaterializedViewStatistics

Statistics of materialized views considered in a query job.

JSON representation
 { 
 "materializedView" 
 : 
 [ 
 { 
 object (  MaterializedView 
 
) 
 } 
 ] 
 } 
Fields
materialized View[]

object ( MaterializedView )

Materialized views considered for the query job. Only certain materialized views are used. For a detailed list, see the child message.

If many materialized views are considered, then the list might be incomplete.

MaterializedView

A materialized view considered for a query job.

JSON representation
 { 
 "tableReference" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "chosen" 
 : 
 boolean 
 , 
 "estimatedBytesSaved" 
 : 
 string 
 , 
 "rejectedReason" 
 : 
 enum (  RejectedReason 
 
) 
 } 
Fields
table Reference

object ( TableReference )

The candidate materialized view.

chosen

boolean

Whether the materialized view is chosen for the query.

A materialized view can be chosen to rewrite multiple parts of the same query. If a materialized view is chosen to rewrite any part of the query, then this field is true, even if the materialized view was not chosen to rewrite others parts.

estimated Bytes Saved

string ( int64 format)

If present, specifies a best-effort estimation of the bytes saved by using the materialized view rather than its base tables.

rejected Reason

enum ( RejectedReason )

If present, specifies the reason why the materialized view was not chosen for the query.

RejectedReason

Reason why a materialized view was not chosen for a query. For more information, see Understand why materialized views were rejected .

Enums
REJECTED_REASON_UNSPECIFIED Default unspecified value.
NO_DATA View has no cached data because it has not refreshed yet.
COST

The estimated cost of the view is more expensive than another view or the base table.

Note: The estimate cost might not match the billed cost.

BASE_TABLE_TRUNCATED View has no cached data because a base table is truncated.
BASE_TABLE_DATA_CHANGE View is invalidated because of a data change in one or more base tables. It could be any recent change if the maxStaleness option is not set for the view, or otherwise any change outside of the staleness window.
BASE_TABLE_PARTITION_EXPIRATION_CHANGE View is invalidated because a base table's partition expiration has changed.
BASE_TABLE_EXPIRED_PARTITION View is invalidated because a base table's partition has expired.
TIME_ZONE View is invalidated because it was refreshed with a time zone other than that of the current job.
OUT_OF_TIME_TRAVEL_WINDOW View is outside the time travel window.
BASE_TABLE_FINE_GRAINED_SECURITY_POLICY View is inaccessible to the user because of a fine-grained security policy on one of its base tables.
BASE_TABLE_TOO_STALE One of the view's base tables is too stale. For example, the cached metadata of a BigLake external table needs to be updated.

MetadataCacheStatistics

Statistics for metadata caching in BigLake tables.

JSON representation
 { 
 "tableMetadataCacheUsage" 
 : 
 [ 
 { 
 object (  TableMetadataCacheUsage 
 
) 
 } 
 ] 
 } 
Fields

TableMetadataCacheUsage

Table level detail on the usage of metadata caching. Only set for Metadata caching eligible tables referenced in the query.

JSON representation
 { 
 "staleness" 
 : 
 string 
 , 
 "tableType" 
 : 
 string 
 , 
 "tableReference" 
 : 
 { 
 object (  TableReference 
 
) 
 } 
 , 
 "unusedReason" 
 : 
 enum (  UnusedReason 
 
) 
 , 
 "explanation" 
 : 
 string 
 } 
Fields
staleness

string ( Duration format)

Duration since last refresh as of this job for managed tables (indicates metadata cache staleness as seen by this job).

A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .

table Type

string

Table type .

table Reference

object ( TableReference )

Metadata caching eligible table referenced in the query.

unused Reason

enum ( UnusedReason )

Reason for not using metadata caching for the table.

explanation

string

Free form human-readable reason metadata caching was unused for the job.

UnusedReason

Reasons for not using metadata caching.

Enums
UNUSED_REASON_UNSPECIFIED Unused reasons not specified.
EXCEEDED_MAX_STALENESS Metadata cache was outside the table's maxStaleness.
OTHER_REASON Other unknown reason.

JobStatistics3

Statistics for a load job.

JSON representation
 { 
 "inputFiles" 
 : 
 string 
 , 
 "inputFileBytes" 
 : 
 string 
 , 
 "outputRows" 
 : 
 string 
 , 
 "outputBytes" 
 : 
 string 
 , 
 "badRecords" 
 : 
 string 
 , 
 "timeline" 
 : 
 [ 
 { 
 object (  QueryTimelineSample 
 
) 
 } 
 ] 
 } 
Fields
input Files

string ( Int64Value format)

Output only. Number of source files in a load job.

input File Bytes

string ( Int64Value format)

Output only. Number of bytes of source data in a load job.

output Rows

string ( Int64Value format)

Output only. Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.

output Bytes

string ( Int64Value format)

Output only. Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.

bad Records

string ( Int64Value format)

Output only. The number of bad records encountered. Note that if the job has failed because of more bad records encountered than the maximum allowed in the load job configuration, then this number can be less than the total number of bad records present in the input data.

timeline[]

object ( QueryTimelineSample )

Output only. Describes a timeline of job execution.

JobStatistics4

Statistics for an extract job.

JSON representation
 { 
 "destinationUriFileCounts" 
 : 
 [ 
 string 
 ] 
 , 
 "inputBytes" 
 : 
 string 
 , 
 "timeline" 
 : 
 [ 
 { 
 object (  QueryTimelineSample 
 
) 
 } 
 ] 
 } 
Fields
destination Uri File Counts[]

string ( int64 format)

Output only. Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.

input Bytes

string ( Int64Value format)

Output only. Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes and doesn't have any relationship with the number of actual result bytes extracted in the desired format.

timeline[]

object ( QueryTimelineSample )

Output only. Describes a timeline of job execution.

CopyJobStatistics

Statistics for a copy job.

JSON representation
 { 
 "copiedRows" 
 : 
 string 
 , 
 "copiedLogicalBytes" 
 : 
 string 
 } 
Fields
copied Rows

string ( Int64Value format)

Output only. Number of rows copied to the destination table.

copied Logical Bytes

string ( Int64Value format)

Output only. Number of logical bytes copied to the destination table.

ScriptStatistics

Job statistics specific to the child job of a script.

JSON representation
 { 
 "evaluationKind" 
 : 
 enum (  EvaluationKind 
 
) 
 , 
 "stackFrames" 
 : 
 [ 
 { 
 object (  ScriptStackFrame 
 
) 
 } 
 ] 
 } 
Fields
evaluation Kind

enum ( EvaluationKind )

Whether this child job was a statement or expression.

stack Frames[]

object ( ScriptStackFrame )

Stack trace showing the line/column/procedure name of each frame on the stack at the point where the current evaluation happened. The leaf frame is first, the primary script is last. Never empty.

EvaluationKind

Describes how the job is evaluated.

Enums
EVALUATION_KIND_UNSPECIFIED Default value.
STATEMENT The statement appears directly in the script.
EXPRESSION The statement evaluates an expression that appears in the script.

ScriptStackFrame

Represents the location of the statement/expression being evaluated. Line and column numbers are defined as follows:

  • Line and column numbers start with one. That is, line 1 column 1 denotes the start of the script.
  • When inside a stored procedure, all line/column numbers are relative to the procedure body, not the script in which the procedure was defined.
  • Start/end positions exclude leading/trailing comments and whitespace. The end position always ends with a ";", when present.
  • Multi-byte Unicode characters are treated as just one column.
  • If the original script (or procedure definition) contains TAB characters, a tab "snaps" the indentation forward to the nearest multiple of 8 characters, plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 will advance the next character to column 9. A TAB on column 9, 10, 11, 12, 13, 14, 15, or 16 will advance the next character to column 17.
JSON representation
 { 
 "startLine" 
 : 
 integer 
 , 
 "startColumn" 
 : 
 integer 
 , 
 "endLine" 
 : 
 integer 
 , 
 "endColumn" 
 : 
 integer 
 , 
 "procedureId" 
 : 
 string 
 , 
 "text" 
 : 
 string 
 } 
Fields
start Line

integer

Output only. One-based start line.

start Column

integer

Output only. One-based start column.

end Line

integer

Output only. One-based end line.

end Column

integer

Output only. One-based end column.

procedure Id

string

Output only. Name of the active procedure, empty if in a top-level script.

text

string

Output only. Text of the current statement/expression.

RowLevelSecurityStatistics

Statistics for row-level security.

JSON representation
 { 
 "rowLevelSecurityApplied" 
 : 
 boolean 
 } 
Fields
row Level Security Applied

boolean

Whether any accessed data was protected by row access policies.

DataMaskingStatistics

Statistics for data-masking.

JSON representation
 { 
 "dataMaskingApplied" 
 : 
 boolean 
 } 
Fields
data Masking Applied

boolean

Whether any accessed data was protected by the data masking.

TransactionInfo

[Alpha] Information of a multi-statement transaction.

JSON representation
 { 
 "transactionId" 
 : 
 string 
 } 
Fields
transaction Id

string

Output only. [Alpha] Id of the transaction.

ReservationEdition

The type of editions. Different features and behaviors are provided to different editions Capacity commitments and reservations are linked to editions.

Enums
RESERVATION_EDITION_UNSPECIFIED Default value, which will be treated as ENTERPRISE.
STANDARD Standard edition.
ENTERPRISE Enterprise edition.
ENTERPRISE_PLUS Enterprise Plus edition.

JobStatus

JSON representation
 { 
 "errorResult" 
 : 
 { 
 object (  ErrorProto 
 
) 
 } 
 , 
 "errors" 
 : 
 [ 
 { 
 object (  ErrorProto 
 
) 
 } 
 ] 
 , 
 "state" 
 : 
 string 
 } 
Fields
error Result

object ( ErrorProto )

Output only. Final error result of the job. If present, indicates that the job has completed and was unsuccessful.

errors[]

object ( ErrorProto )

Output only. The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has not completed or was unsuccessful.

state

string

Output only. Running state of the job. Valid states include 'PENDING', 'RUNNING', and 'DONE'.