- JSON representation
- JobConfiguration
- JobConfigurationQuery
- ScriptOptions
- KeyResultStatementKind
- JobConfigurationLoad
- DestinationTableProperties
- JobConfigurationTableCopy
- OperationType
- JobConfigurationExtract
- ModelExtractOptions
- JobStatistics
- JobStatistics2
- ExplainQueryStage
- ExplainQueryStep
- QueryTimelineSample
- MlStatistics
- TrainingType
- ExportDataStatistics
- ExternalServiceCost
- BiEngineStatistics
- BiEngineMode
- BiEngineReason
- Code
- LoadQueryStatistics
- JobStatistics3
- JobStatistics4
- ScriptStatistics
- EvaluationKind
- ScriptStackFrame
- RowLevelSecurityStatistics
- TransactionInfo
- JobStatus
JSON representation |
---|
{ "kind": string, "etag": string, "id": string, "selfLink": string, "user_email": string, "configuration": { object ( |
Fields | |
---|---|
kind |
Output only. The type of the resource. |
etag |
Output only. A hash of this resource. |
id |
Output only. Opaque ID field of the job. |
selfLink |
Output only. A URL that can be used to access the resource again. |
user_email |
Output only. Email address of the user who ran the job. |
configuration |
Required. Describes the job configuration. |
jobReference |
Optional. Reference describing the unique-per-user name of the job. |
statistics |
Output only. Information about the job, including starting time and ending time of the job. |
status |
Output only. The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. |
JobConfiguration
JSON representation |
---|
{ "jobType": string, "query": { object ( |
Fields | |
---|---|
jobType |
Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
query |
[Pick one] Configures a query job. |
load |
[Pick one] Configures a load job. |
copy |
[Pick one] Copies a table. |
extract |
[Pick one] Configures an extract job. |
dryRun |
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. |
jobTimeoutMs |
Optional. Job timeout in milliseconds. If this time limit is exceeded, BigQuery might attempt to stop the job. |
labels |
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. An object containing a list of |
JobConfigurationQuery
JobConfigurationQuery configures a BigQuery query job.
JSON representation |
---|
{ "query": string, "destinationTable": { object ( |
Fields | |
---|---|
query |
[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
destinationTable |
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. |
tableDefinitions |
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. An object containing a list of |
userDefinedFunctionResources[] |
Describes user-defined function resources used in the query. |
createDisposition |
Optional. Specifies whether the job is allowed to create new tables. The following values are supported:
The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. |
writeDisposition |
Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:
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. |
defaultDataset |
Optional. Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. |
priority |
Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
preserveNulls |
[Deprecated] This property is deprecated. |
allowLargeResults |
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 standard SQL 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. |
useQueryCache |
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. |
flattenResults |
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 standard SQL queries, this flag is ignored and results are never flattened. |
maximumBillingTier |
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. |
maximumBytesBilled |
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. |
useLegacySql |
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 standard SQL: 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. |
parameterMode |
Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
queryParameters[] |
jobs.query parameters for standard SQL queries. |
schemaUpdateOptions[] |
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:
|
timePartitioning |
Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
rangePartitioning |
Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
clustering |
Clustering specification for the destination table. |
destinationEncryptionConfiguration |
Custom encryption configuration (e.g., Cloud KMS keys) |
scriptOptions |
Options controlling the execution of scripts. |
connectionProperties[] |
Connection properties which can modify the query behavior. |
createSession |
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 The new session's location will be set to |
ScriptOptions
JSON representation |
---|
{
"statementTimeoutMs": string,
"statementByteBudget": string,
"keyResultStatement": enum ( |
Fields | |
---|---|
statementTimeoutMs |
Timeout period for each statement in a script. |
statementByteBudget |
Limit on the number of bytes billed per statement. Exceeding this budget results in an error. |
keyResultStatement |
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
Enums | |
---|---|
KEY_RESULT_STATEMENT_KIND_UNSPECIFIED |
|
LAST |
|
FIRST_SELECT |
JobConfigurationLoad
JobConfigurationLoad contains the configuration properties for loading data into a destination table.
JSON representation |
---|
{ "sourceUris": [ string ], "schema": { object ( |
Fields | |
---|---|
sourceUris[] |
[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. |
schema |
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. |
destinationTable |
[Required] The destination table to load the data into. |
destinationTableProperties |
Optional. [Experimental] Properties with which to create the destination table if it is new. |
createDisposition |
Optional. Specifies whether the job is allowed to create new tables. The following values are supported:
|
writeDisposition |
Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:
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. |
nullMarker |
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. |
fieldDelimiter |
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). |
skipLeadingRows |
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:
|
encoding |
Optional. The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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. |
quote |
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 " |
maxBadRecords |
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. |
schemaInlineFormat |
[Deprecated] The format of the schemaInline property. |
schemaInline |
[Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
allowQuotedNewlines |
Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
sourceFormat |
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. |
allowJaggedRows |
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. |
ignoreUnknownValues |
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. |
projectionFields[] |
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 |
Optional. Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
schemaUpdateOptions[] |
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:
|
timePartitioning |
Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
rangePartitioning |
Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
clustering |
Clustering specification for the destination table. |
destinationEncryptionConfiguration |
Custom encryption configuration (e.g., Cloud KMS keys) |
useAvroLogicalTypes |
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). |
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. |
decimalTargetTypes[] |
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:
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. |
parquetOptions |
Optional. Additional properties to set if sourceFormat is set to PARQUET. |
preserveAsciiControlCharacters |
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. |
DestinationTableProperties
JSON representation |
---|
{ "friendlyName": string, "description": string, "labels": { string: string, ... } } |
Fields | |
---|---|
friendlyName |
Optional. Friendly name for the destination table. If the table already exists, it should be same as the existing friendly name. |
description |
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 |
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. An object containing a list of |
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 ( |
Fields | |
---|---|
sourceTable |
[Pick one] Source table to copy. |
sourceTables[] |
[Pick one] Source tables to copy. |
destinationTable |
[Required] The destination table. |
createDisposition |
Optional. Specifies whether the job is allowed to create new tables. The following values are supported:
The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. |
writeDisposition |
Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:
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. |
destinationEncryptionConfiguration |
Custom encryption configuration (e.g., Cloud KMS keys). |
operationType |
Optional. Supported operation types in table copy job. |
destinationExpirationTime |
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 ( |
Fields | |
---|---|
destinationUri |
[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. |
destinationUris[] |
[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
printHeader |
Optional. Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
fieldDelimiter |
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. |
destinationFormat |
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 |
Optional. The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro. Not applicable when extracting models. |
useAvroLogicalTypes |
Whether to use logical types when extracting to AVRO format. Not applicable when extracting models. |
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: |
|
sourceTable |
A reference to the table being exported. |
sourceModel |
A reference to the model being exported. |
ModelExtractOptions
Options related to model extraction.
JSON representation |
---|
{ "trialId": string } |
Fields | |
---|---|
trialId |
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 ( |
Fields | |
---|---|
creationTime |
Output only. Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
startTime |
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. |
endTime |
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. |
totalBytesProcessed |
Output only. Total bytes processed for the job. |
completionRatio |
Output only. [TrustedTester] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
quotaDeferments[] |
Output only. Quotas which delayed this job's start time. |
query |
Output only. Statistics for a query job. |
load |
Output only. Statistics for a load job. |
extract |
Output only. Statistics for an extract job. |
totalSlotMs |
Output only. Slot-milliseconds for the job. |
reservationUsage[] |
Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated. |
reservationUsage[] |
Reservation name or "unreserved" for on-demand resources usage. |
reservationUsage[] |
Total slot milliseconds used by the reservation for a particular job. |
reservation_id |
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. |
numChildJobs |
Output only. Number of child jobs executed. |
parentJobId |
Output only. If this is a child job, specifies the job ID of the parent. |
scriptStatistics |
Output only. If this a child job of a script, specifies information about the context of this job within the script. |
rowLevelSecurityStatistics |
Output only. Statistics for row-level security. Present only for query and extract jobs. |
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. |
sessionInfo |
Output only. [Preview] Information of the session if this job is part of one. |
JobStatistics2
Statistics for a query job.
JSON representation |
---|
{ "queryPlan": [ { object ( |
Fields | |
---|---|
queryPlan[] |
Output only. Describes execution plan for the query. |
estimatedBytesProcessed |
Output only. The original estimate of bytes processed for the job. |
timeline[] |
Output only. Describes a timeline of job execution. |
totalPartitionsProcessed |
Output only. Total number of partitions processed from all partitioned tables referenced in the job. |
totalBytesProcessed |
Output only. Total bytes processed for the job. |
totalBytesProcessedAccuracy |
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. |
totalBytesBilled |
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. |
billingTier |
Output only. Billing tier for the job. This is a BigQuery-specific concept which is not related to the GCP 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. |
totalSlotMs |
Output only. Slot-milliseconds for the job. |
reservationUsage[] |
Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated. |
reservationUsage[] |
Reservation name or "unreserved" for on-demand resources usage. |
reservationUsage[] |
Total slot milliseconds used by the reservation for a particular job. |
cacheHit |
Output only. Whether the query result was fetched from the query cache. |
referencedTables[] |
Output only. Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
referencedRoutines[] |
Output only. Referenced routines for the job. |
schema |
Output only. The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
numDmlAffectedRows |
Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
dmlStats |
Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE. |
undeclaredQueryParameters[] |
Output only. Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
statementType |
Output only. The type of query statement, if valid. Possible values:
|
ddlOperationPerformed |
Output only. The DDL operation performed, possibly dependent on the pre-existence of the DDL target. |
ddlTargetTable |
Output only. The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
ddlTargetRowAccessPolicy |
Output only. The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
ddlAffectedRowAccessPolicyCount |
Output only. The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
ddlTargetRoutine |
Output only. [Beta] The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
mlStatistics |
Output only. Statistics of a BigQuery ML training job. |
exportDataStatistics |
Output only. Stats for EXPORT DATA statement. |
externalServiceCosts[] |
Output only. Job cost breakdown as bigquery internal cost and external service costs. |
biEngineStatistics |
Output only. BI Engine specific Statistics. |
loadQueryStatistics |
Output only. Statistics for a LOAD query. |
dclTargetTable |
Output only. Referenced table for DCL statement. |
dclTargetView |
Output only. Referenced view for DCL statement. |
dclTargetDataset |
Output only. Referenced dataset for DCL statement. |
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 ( |
Fields | |
---|---|
name |
Human-readable name for the stage. |
id |
Unique ID for the stage within the plan. |
startMs |
Stage start time represented as milliseconds since the epoch. |
endMs |
Stage end time represented as milliseconds since the epoch. |
inputStages[] |
IDs for stages that are inputs to this stage. |
waitRatioAvg |
Relative amount of time the average shard spent waiting to be scheduled. |
waitMsAvg |
Milliseconds the average shard spent waiting to be scheduled. |
waitRatioMax |
Relative amount of time the slowest shard spent waiting to be scheduled. |
waitMsMax |
Milliseconds the slowest shard spent waiting to be scheduled. |
readRatioAvg |
Relative amount of time the average shard spent reading input. |
readMsAvg |
Milliseconds the average shard spent reading input. |
readRatioMax |
Relative amount of time the slowest shard spent reading input. |
readMsMax |
Milliseconds the slowest shard spent reading input. |
computeRatioAvg |
Relative amount of time the average shard spent on CPU-bound tasks. |
computeMsAvg |
Milliseconds the average shard spent on CPU-bound tasks. |
computeRatioMax |
Relative amount of time the slowest shard spent on CPU-bound tasks. |
computeMsMax |
Milliseconds the slowest shard spent on CPU-bound tasks. |
writeRatioAvg |
Relative amount of time the average shard spent on writing output. |
writeMsAvg |
Milliseconds the average shard spent on writing output. |
writeRatioMax |
Relative amount of time the slowest shard spent on writing output. |
writeMsMax |
Milliseconds the slowest shard spent on writing output. |
shuffleOutputBytes |
Total number of bytes written to shuffle. |
shuffleOutputBytesSpilled |
Total number of bytes written to shuffle and spilled to disk. |
recordsRead |
Number of records read into the stage. |
recordsWritten |
Number of records written by the stage. |
parallelInputs |
Number of parallel input segments to be processed |
completedParallelInputs |
Number of parallel input segments completed. |
status |
Current status for this stage. |
steps[] |
tabledata.list of operations within the stage in dependency order (approximately chronological). |
slotMs |
Slot-milliseconds used by the stage. |
ExplainQueryStep
An operation within a stage.
JSON representation |
---|
{ "kind": string, "substeps": [ string ] } |
Fields | |
---|---|
kind |
Machine-readable operation type. |
substeps[] |
Human-readable description of the step(s). |
QueryTimelineSample
Summary of the state of query execution at a given time.
JSON representation |
---|
{ "elapsedMs": string, "totalSlotMs": string, "pendingUnits": string, "completedUnits": string, "activeUnits": string } |
Fields | |
---|---|
elapsedMs |
Milliseconds elapsed since the start of query execution. |
totalSlotMs |
Cumulative slot-ms consumed by the query. |
pendingUnits |
Total parallel units of work remaining for the active stages. |
completedUnits |
Total parallel units of work completed by this query. |
activeUnits |
Total number of active workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
MlStatistics
Job statistics specific to a BigQuery ML training job.
JSON representation |
---|
{ "maxIterations": string, "iterationResults": [ { object ( |
Fields | |
---|---|
maxIterations |
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. |
iterationResults[] |
Results for all completed iterations. Empty for hyperparameter tuning jobs. |
modelType |
Output only. The type of the model that is being trained. |
trainingType |
Output only. Training type of the job. |
hparamTrials[] |
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 | |
---|---|
fileCount |
Number of destination files generated in case of EXPORT DATA statement only. |
rowCount |
[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 | |
---|---|
externalService |
External service name. |
bytesProcessed |
External service cost in terms of bigquery bytes processed. |
bytesBilled |
External service cost in terms of bigquery bytes billed. |
slotMs |
External service cost in terms of bigquery slot milliseconds. |
reservedSlotCount |
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 ( |
Fields | |
---|---|
biEngineMode |
Output only. Specifies which mode of BI Engine acceleration was performed (if any). |
biEngineReasons[] |
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. |
BiEngineReason
Reason why BI Engine didn't accelerate the query (or sub-query).
JSON representation |
---|
{
"code": enum ( |
Fields | |
---|---|
code |
Output only. High-level BI Engine reason for partial or disabled acceleration |
message |
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. |
UNCACHED |
Data is not-cached and could not be accelerated by BI Engine. |
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 | |
---|---|
inputFiles |
Output only. Number of source files in a LOAD query. |
inputFileBytes |
Output only. Number of bytes of source data in a LOAD query. |
outputRows |
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. |
outputBytes |
Output only. Size of the loaded data in bytes. Note that while a LOAD query is in the running state, this value may change. |
badRecords |
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 |
Output only. The number of bytes of source data copied over the network for a LOAD query. If the query is charged for data transferred on the network, the user may be separately billed for these bytes. |
JobStatistics3
Statistics for a load job.
JSON representation |
---|
{
"inputFiles": string,
"inputFileBytes": string,
"outputRows": string,
"outputBytes": string,
"badRecords": string,
"timeline": [
{
object ( |
Fields | |
---|---|
inputFiles |
Output only. Number of source files in a load job. |
inputFileBytes |
Output only. Number of bytes of source data in a load job. |
outputRows |
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. |
outputBytes |
Output only. Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
badRecords |
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[] |
Output only. Describes a timeline of job execution. |
JobStatistics4
Statistics for an extract job.
JSON representation |
---|
{
"destinationUriFileCounts": [
string
],
"inputBytes": string,
"timeline": [
{
object ( |
Fields | |
---|---|
destinationUriFileCounts[] |
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. |
inputBytes |
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[] |
Output only. Describes a timeline of job execution. |
ScriptStatistics
Job statistics specific to the child job of a script.
JSON representation |
---|
{ "evaluationKind": enum ( |
Fields | |
---|---|
evaluationKind |
Whether this child job was a statement or expression. |
stackFrames[] |
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
Enums | |
---|---|
EVALUATION_KIND_UNSPECIFIED |
|
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 | |
---|---|
startLine |
Output only. One-based start line. |
startColumn |
Output only. One-based start column. |
endLine |
Output only. One-based end line. |
endColumn |
Output only. One-based end column. |
procedureId |
Output only. Name of the active procedure, empty if in a top-level script. |
text |
Output only. Text of the current statement/expression. |
RowLevelSecurityStatistics
Statistics for row-level security.
JSON representation |
---|
{ "rowLevelSecurityApplied": boolean } |
Fields | |
---|---|
rowLevelSecurityApplied |
Whether any accessed data was protected by row access policies. |
TransactionInfo
[Alpha] Information of a multi-statement transaction.
JSON representation |
---|
{ "transactionId": string } |
Fields | |
---|---|
transactionId |
Output only. [Alpha] Id of the transaction. |
JobStatus
JSON representation |
---|
{ "errorResult": { object ( |
Fields | |
---|---|
errorResult |
Output only. Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
errors[] |
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 |
Output only. Running state of the job. Valid states include 'PENDING', 'RUNNING', and 'DONE'. |