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)
  }
}
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.

jobReference

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.

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
jobType

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.

dryRun

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.

jobTimeoutMs

string (Int64Value format)

[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.

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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

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": number,
  "maximumBytesBilled": string,
  "useLegacySql": boolean,
  "parameterMode": string,
  "queryParameters": [
    {
      object (QueryParameter)
    }
  ],
  "schemaUpdateOptions": [
    string
  ],
  "timePartitioning": {
    object (TimePartitioning)
  },
  "clustering": {
    object (Clustering)
  },
  "destinationEncryptionConfiguration": {
    object (EncryptionConfiguration)
  }
}
Fields
query

string

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

destinationTable

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.

tableDefinitions

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

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

userDefinedFunctionResources[]

object (UserDefinedFunctionResource)

Describes user-defined function resources used in the query.

createDisposition

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.

writeDisposition

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 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.

defaultDataset

object (DatasetReference)

[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

string

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

preserveNulls

boolean

[Deprecated] This property is deprecated.

allowLargeResults

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 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

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.

flattenResults

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 standard SQL queries, this flag is ignored and results are never flattened.

maximumBillingTier

number

[Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.

maximumBytesBilled

string (Int64Value format)

[Optional] 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

boolean

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

string

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

queryParameters[]

object (QueryParameter)

jobs.query parameters for standard SQL queries.

schemaUpdateOptions[]

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.

timePartitioning

object (TimePartitioning)

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

clustering

object (Clustering)

[Experimental] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

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

JobConfigurationLoad

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

JSON representation
{
  "sourceUris": [
    string
  ],
  "schema": {
    object (TableSchema)
  },
  "destinationTable": {
    object (TableReference)
  },
  "destinationTableProperties": {
    object (DestinationTableProperties)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "nullMarker": string,
  "fieldDelimiter": string,
  "skipLeadingRows": number,
  "encoding": string,
  "quote": string,
  "maxBadRecords": number,
  "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,
  "hivePartitioningOptions": {
    object (HivePartitioningOptions)
  }
}
Fields
sourceUris[]

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.

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.

destinationTable

object (TableReference)

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

destinationTableProperties

object (DestinationTableProperties)

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

createDisposition

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.

writeDisposition

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. 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.

nullMarker

string

[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').

fieldDelimiter

string

[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').

skipLeadingRows

number

[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.

encoding

string

[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

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. @default "

maxBadRecords

number

[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.

schemaInlineFormat

string

[Deprecated] The format of the schemaInline property.

schemaInline

string

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

allowQuotedNewlines

boolean

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

sourceFormat

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.

allowJaggedRows

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.

ignoreUnknownValues

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

projectionFields[]

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.

schemaUpdateOptions[]

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.

timePartitioning

object (TimePartitioning)

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

rangePartitioning

object (RangePartitioning)

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

clustering

object (Clustering)

[Experimental] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

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

useAvroLogicalTypes

boolean

[Optional] If sourceFormat is set to "AVRO", indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER). The default value will be true once this feature launches, but can be set now in preparation.

hivePartitioningOptions

object (HivePartitioningOptions)

[Optional, Trusted Tester] 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.

DestinationTableProperties

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

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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

RangePartitioning

JSON representation
{
  "field": string,
  "range": {
    "start": string,
    "end": string,
    "interval": string
  }
}
Fields
field

string

Required. [Experimental] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.

range

object

range.start

string

Required. [Experimental] The start of range partitioning, inclusive.

range.end

string

Required. [Experimental] The end of range partitioning, exclusive.

range.interval

string

Required. [Experimental] The width of each interval.

JobConfigurationTableCopy

JobConfigurationTableCopy configures a job that copies data from one table to another.

JSON representation
{
  "sourceTable": {
    object (TableReference)
  },
  "sourceTables": [
    {
      object (TableReference)
    }
  ],
  "destinationTable": {
    object (TableReference)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "destinationEncryptionConfiguration": {
    object (EncryptionConfiguration)
  }
}
Fields
sourceTable

object (TableReference)

[Pick one] Source table to copy.

sourceTables[]

object (TableReference)

[Pick one] Source tables to copy.

destinationTable

object (TableReference)

[Required] The destination table.

createDisposition

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.

writeDisposition

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. 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.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

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

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,

  // 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
destinationUri

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.

destinationUris[]

string

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

printHeader

boolean

[Optional] Whether to print out a header row in the results. Default is true.

fieldDelimiter

string

[Optional] When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ','

destinationFormat

string

[Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL 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 SAVED_MODEL.

compression

string

[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.

useAvroLogicalTypes

boolean

Whether to use logical types when extracting to AVRO format.

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

object (TableReference)

A reference to the table being exported.

sourceModel

object (ModelReference)

A reference to the model being exported.

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)
  },
  "totalSlotMs": string,
  "reservationUsage": [
    {
      "name": string,
      "slotMs": string
    }
  ],
  "reservationId": string,
  "numChildJobs": string,
  "parentJobId": string,
  "scriptStatistics": {
    object (ScriptStatistics)
  }
}
Fields
creationTime

string (int64 format)

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

startTime

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.

endTime

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.

totalBytesProcessed

string (Int64Value format)

Output only. Total bytes processed for the job.

completionRatio

number

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

quotaDeferments[]

string

Output only. Ouput 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.

totalSlotMs

string (Int64Value format)

Output only. Slot-milliseconds for the job.

reservationUsage[]

object

Output only. Job resource usage breakdown by reservation.

reservationUsage[].name

string

Reservation name or "unreserved" for on-demand resources usage.

reservationUsage[].slotMs

string (Int64Value format)

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

reservationId

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.

numChildJobs

string (int64 format)

Output only. Number of child jobs executed.

parentJobId

string

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

scriptStatistics

object (ScriptStatistics)

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

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": number,
  "totalSlotMs": string,
  "reservationUsage": [
    {
      "name": string,
      "slotMs": string
    }
  ],
  "cacheHit": boolean,
  "referencedTables": [
    {
      object (TableReference)
    }
  ],
  "referencedRoutines": [
    {
      object (RoutineReference)
    }
  ],
  "schema": {
    object (TableSchema)
  },
  "numDmlAffectedRows": string,
  "undeclaredQueryParameters": [
    {
      object (QueryParameter)
    }
  ],
  "statementType": string,
  "ddlOperationPerformed": string,
  "ddlTargetTable": {
    object (TableReference)
  },
  "ddlTargetRoutine": {
    object (RoutineReference)
  }
}
Fields
queryPlan[]

object (ExplainQueryStage)

Output only. Describes execution plan for the query.

estimatedBytesProcessed

string (Int64Value format)

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

timeline[]

object (QueryTimelineSample)

Output only. [Beta] Describes a timeline of job execution.

totalPartitionsProcessed

string (Int64Value format)

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

totalBytesProcessed

string (Int64Value format)

Output only. Total bytes processed for the job.

totalBytesProcessedAccuracy

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.

totalBytesBilled

string (Int64Value format)

Output only. Total bytes billed for the job.

billingTier

number

Output only. Billing tier for the job.

totalSlotMs

string (Int64Value format)

Output only. Slot-milliseconds for the job.

reservationUsage[]

object

Output only. Job resource usage breakdown by reservation.

reservationUsage[].name

string

Reservation name or "unreserved" for on-demand resources usage.

reservationUsage[].slotMs

string (Int64Value format)

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

cacheHit

boolean

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

referencedTables[]

object (TableReference)

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

referencedRoutines[]

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.

numDmlAffectedRows

string (Int64Value format)

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

undeclaredQueryParameters[]

object (QueryParameter)

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

statementType

string

Output only. The type of query statement, if valid. Possible values (new values might be added in the future): "SELECT": SELECT query. "INSERT": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "UPDATE": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "DELETE": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "MERGE": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "ALTER_TABLE": ALTER TABLE query. "ALTER_VIEW": ALTER VIEW query. "ASSERT": ASSERT condition AS 'description'. "CREATE_FUNCTION": CREATE FUNCTION query. "CREATE_MODEL": CREATE [OR REPLACE] MODEL ... AS SELECT ... . "CREATE_PROCEDURE": CREATE PROCEDURE query. "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS SELECT ... . "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... . "DROP_FUNCTION" : DROP FUNCTION query. "DROP_PROCEDURE": DROP PROCEDURE query. "DROP_TABLE": DROP TABLE query. "DROP_VIEW": DROP VIEW query.

ddlOperationPerformed

string

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

ddlTargetTable

object (TableReference)

Output only. The DDL target table. Present only for CREATE/DROP TABLE/VIEW queries.

ddlTargetRoutine

object (RoutineReference)

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

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)
    }
  ]
}
Fields
name

string

Human-readable name for the stage.

id

string (Int64Value format)

Unique ID for the stage within the plan.

startMs

string (int64 format)

Stage start time represented as milliseconds since the epoch.

endMs

string (int64 format)

Stage end time represented as milliseconds since the epoch.

inputStages[]

string (int64 format)

IDs for stages that are inputs to this stage.

waitRatioAvg

number

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

waitMsAvg

string (Int64Value format)

Milliseconds the average shard spent waiting to be scheduled.

waitRatioMax

number

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

waitMsMax

string (Int64Value format)

Milliseconds the slowest shard spent waiting to be scheduled.

readRatioAvg

number

Relative amount of time the average shard spent reading input.

readMsAvg

string (Int64Value format)

Milliseconds the average shard spent reading input.

readRatioMax

number

Relative amount of time the slowest shard spent reading input.

readMsMax

string (Int64Value format)

Milliseconds the slowest shard spent reading input.

computeRatioAvg

number

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

computeMsAvg

string (Int64Value format)

Milliseconds the average shard spent on CPU-bound tasks.

computeRatioMax

number

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

computeMsMax

string (Int64Value format)

Milliseconds the slowest shard spent on CPU-bound tasks.

writeRatioAvg

number

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

writeMsAvg

string (Int64Value format)

Milliseconds the average shard spent on writing output.

writeRatioMax

number

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

writeMsMax

string (Int64Value format)

Milliseconds the slowest shard spent on writing output.

shuffleOutputBytes

string (Int64Value format)

Total number of bytes written to shuffle.

shuffleOutputBytesSpilled

string (Int64Value format)

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

recordsRead

string (Int64Value format)

Number of records read into the stage.

recordsWritten

string (Int64Value format)

Number of records written by the stage.

parallelInputs

string (Int64Value format)

Number of parallel input segments to be processed

completedParallelInputs

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).

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).

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

string (Int64Value format)

Milliseconds elapsed since the start of query execution.

totalSlotMs

string (Int64Value format)

Cumulative slot-ms consumed by the query.

pendingUnits

string (Int64Value format)

Total parallel units of work remaining for the active stages.

completedUnits

string (Int64Value format)

Total parallel units of work completed by this query.

activeUnits

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.

JobStatistics3

Statistics for a load job.

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

string (Int64Value format)

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

inputFileBytes

string (Int64Value format)

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

outputRows

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.

outputBytes

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.

badRecords

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.

JobStatistics4

Statistics for an extract job.

JSON representation
{
  "destinationUriFileCounts": [
    string
  ],
  "inputBytes": string
}
Fields
destinationUriFileCounts[]

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.

inputBytes

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.

ScriptStatistics

Job statistics specific to the child job of a script.

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

enum (EvaluationKind)

Whether this child job was a statement or expression.

stackFrames[]

object (StackFrame)

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.

StackFrame

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": number,
  "startColumn": number,
  "endLine": number,
  "endColumn": number,
  "procedureId": string,
  "text": string
}
Fields
startLine

number

Output only. One-based start line.

startColumn

number

Output only. One-based start column.

endLine

number

Output only. One-based end line.

endColumn

number

Output only. One-based end column.

procedureId

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.

JobStatus

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

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'.

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...