Cancel

Requests that a job be cancelled

3 variables
134 variables

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data in Google BigQuery
  • View and manage your data across Google Cloud Platform services

Input

This building block consumes 3 input parameters

  = Parameter name
  = Format

projectId STRING Required

[Required] Project ID of the job to cancel

jobId STRING Required

[Required] Job ID of the job to cancel

location STRING

The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location

Output

This building block provides 134 output parameters

  = Parameter name
  = Format

kind STRING

The resource type of the response

job OBJECT

job.jobReference OBJECT

job.jobReference.location STRING

The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location

job.jobReference.jobId STRING

[Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters

job.jobReference.projectId STRING

[Required] The ID of the project containing this job

job.status OBJECT

job.status.errorResult OBJECT

job.status.errorResult.reason STRING

A short error code that summarizes the error

job.status.errorResult.message STRING

A human-readable description of the error

job.status.errorResult.location STRING

Specifies where the error occurred, if present

job.status.errorResult.debugInfo STRING

Debugging information. This property is internal to Google and should not be used

job.status.errors[] OBJECT

job.status.errors[].reason STRING

A short error code that summarizes the error

job.status.errors[].message STRING

A human-readable description of the error

job.status.errors[].location STRING

Specifies where the error occurred, if present

job.status.errors[].debugInfo STRING

Debugging information. This property is internal to Google and should not be used

job.status.state STRING

[Output-only] Running state of the job

job.statistics OBJECT

job.statistics.completionRatio NUMBER

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

job.statistics.startTime INTEGER

[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

job.statistics.totalBytesProcessed INTEGER

[Output-only] [Deprecated] Use the bytes processed in the query statistics instead

job.statistics.query OBJECT

job.statistics.query.modelTrainingCurrentIteration INTEGER

[Output-only, Beta] Deprecated; do not use

job.statistics.query.numDmlAffectedRows INTEGER

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

job.statistics.query.totalBytesProcessed INTEGER

[Output-only] Total bytes processed for the job

job.statistics.query.billingTier INTEGER

[Output-only] Billing tier for the job

job.statistics.query.ddlOperationPerformed STRING

The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): "CREATE": The query created the DDL target. "SKIP": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. "REPLACE": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. "DROP": The query deleted the DDL target

job.statistics.query.statementType STRING

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

job.statistics.query.totalSlotMs INTEGER

[Output-only] Slot-milliseconds for the job

job.statistics.query.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

job.statistics.query.totalBytesBilled INTEGER

[Output-only] Total bytes billed for the job

job.statistics.query.modelTraining OBJECT

job.statistics.query.reservationUsage[] OBJECT

job.statistics.query.cacheHit BOOLEAN

[Output-only] Whether the query result was fetched from the query cache

job.statistics.query.ddlTargetRoutine OBJECT

job.statistics.query.ddlTargetTable OBJECT

job.statistics.query.totalPartitionsProcessed INTEGER

[Output-only] Total number of partitions processed from all partitioned tables referenced in the job

job.statistics.query.schema OBJECT

job.statistics.query.modelTrainingExpectedTotalIteration INTEGER

[Output-only, Beta] Deprecated; do not use

job.statistics.query.estimatedBytesProcessed INTEGER

[Output-only] The original estimate of bytes processed for the job

job.statistics.numChildJobs INTEGER

[Output-only] Number of child jobs executed

job.statistics.totalSlotMs INTEGER

[Output-only] Slot-milliseconds for the job

job.statistics.parentJobId STRING

[Output-only] If this is a child job, the id of the parent

job.statistics.quotaDeferments[] STRING

job.statistics.reservationUsage[] OBJECT

job.statistics.reservationUsage[].slotMs INTEGER

[Output-only] Slot-milliseconds the job spent in the given reservation

job.statistics.reservationUsage[].name STRING

[Output-only] Reservation name or "unreserved" for on-demand resources usage

job.statistics.creationTime INTEGER

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

job.statistics.load OBJECT

job.statistics.load.badRecords INTEGER

[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

job.statistics.load.inputFileBytes INTEGER

[Output-only] Number of bytes of source data in a load job

job.statistics.load.inputFiles INTEGER

[Output-only] Number of source files in a load job

job.statistics.load.outputRows INTEGER

[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

job.statistics.load.outputBytes INTEGER

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

job.statistics.extract OBJECT

job.statistics.extract.inputBytes INTEGER

[Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes

job.statistics.extract.destinationUriFileCounts[] INTEGER

job.statistics.endTime INTEGER

[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

job.selfLink STRING

[Output-only] A URL that can be used to access this resource again

job.id STRING

[Output-only] Opaque ID field of the job

job.configuration OBJECT

job.configuration.load OBJECT

job.configuration.load.allowQuotedNewlines BOOLEAN

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

job.configuration.load.hivePartitioningOptions OBJECT

job.configuration.load.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)

job.configuration.load.skipLeadingRows 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

job.configuration.load.timePartitioning OBJECT

job.configuration.load.autodetect BOOLEAN

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

job.configuration.load.destinationEncryptionConfiguration OBJECT

job.configuration.load.schemaUpdateOptions[] STRING

job.configuration.load.schemaInline STRING

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

job.configuration.load.rangePartitioning OBJECT

job.configuration.load.nullMarker 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

job.configuration.load.schema OBJECT

job.configuration.load.schemaInlineFormat STRING

[Deprecated] The format of the schemaInline property

job.configuration.load.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

job.configuration.load.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

job.configuration.load.destinationTableProperties OBJECT

job.configuration.load.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

job.configuration.load.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

job.configuration.load.destinationTable OBJECT

job.configuration.load.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

job.configuration.load.clustering OBJECT

job.configuration.load.hivePartitioningMode STRING

[Optional, Trusted Tester] If hive partitioning is enabled, which mode to use. Two modes are supported: - AUTO: automatically infer partition key name(s) and type(s). - STRINGS: automatic infer partition key name(s). All types are strings. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error

job.configuration.load.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

job.configuration.load.sourceUris[] STRING

job.configuration.load.maxBadRecords 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. This is only valid for CSV and JSON. The default value is 0, which requires that all records are valid

job.configuration.load.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

job.configuration.load.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 (',')

job.configuration.load.projectionFields[] STRING

job.configuration.labels OBJECT

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

job.configuration.labels.customKey.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

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

job.configuration.jobType STRING

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

job.configuration.extract OBJECT

job.configuration.extract.printHeader BOOLEAN

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

job.configuration.extract.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

job.configuration.extract.destinationUris[] STRING

job.configuration.extract.sourceTable OBJECT

job.configuration.extract.destinationFormat STRING

[Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV

job.configuration.extract.fieldDelimiter STRING

[Optional] Delimiter to use between fields in the exported data. Default is ','

job.configuration.extract.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

job.configuration.copy OBJECT

job.configuration.copy.destinationTable OBJECT

job.configuration.copy.destinationEncryptionConfiguration OBJECT

job.configuration.copy.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

job.configuration.copy.sourceTable OBJECT

job.configuration.copy.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

job.configuration.jobTimeoutMs INTEGER

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

job.configuration.query OBJECT

job.configuration.query.maximumBillingTier INTEGER

[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

job.configuration.query.preserveNulls BOOLEAN

[Deprecated] This property is deprecated

job.configuration.query.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

job.configuration.query.timePartitioning OBJECT

job.configuration.query.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

job.configuration.query.destinationTable OBJECT

job.configuration.query.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

job.configuration.query.clustering OBJECT

job.configuration.query.destinationEncryptionConfiguration OBJECT

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

job.configuration.query.maximumBytesBilled INTEGER

[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

job.configuration.query.schemaUpdateOptions[] STRING

job.configuration.query.priority STRING

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

job.configuration.query.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

job.configuration.query.rangePartitioning OBJECT

job.configuration.query.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

job.configuration.query.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

job.configuration.query.tableDefinitions OBJECT

[Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table

job.configuration.query.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

job.configuration.query.defaultDataset OBJECT

job.user_email STRING

[Output-only] Email address of the user who ran the job

job.kind STRING

[Output-only] The type of the resource

job.etag STRING

[Output-only] A hash of this resource