John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="bigquery_v2.html">BigQuery API</a> . <a href="bigquery_v2.jobs.html">jobs</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 78 | <code><a href="#cancel">cancel(projectId, jobId, location=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 79 | <p class="firstline">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.</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 80 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 81 | <code><a href="#close">close()</a></code></p> |
| 82 | <p class="firstline">Close httplib2 connections.</p> |
| 83 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(projectId, jobId, location=None)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 85 | <p class="firstline">Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 86 | <p class="toc_element"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 87 | <code><a href="#getQueryResults">getQueryResults(projectId, jobId, maxResults=None, startIndex=None, pageToken=None, location=None, timeoutMs=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 88 | <p class="firstline">Retrieves the results of a query job.</p> |
| 89 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 90 | <code><a href="#getQueryResults_next">getQueryResults_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <p class="toc_element"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 93 | <code><a href="#insert">insert(projectId, body=None, media_body=None, media_mime_type=None)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 94 | <p class="firstline">Starts a new asynchronous job. Requires the Can View project role.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 95 | <p class="toc_element"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 96 | <code><a href="#list">list(projectId, minCreationTime=None, pageToken=None, maxCreationTime=None, parentJobId=None, allUsers=None, projection=None, stateFilter=None, maxResults=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 97 | <p class="firstline">Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 98 | <p class="toc_element"> |
| 99 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 100 | <p class="firstline">Retrieves the next page of results.</p> |
| 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#query">query(projectId, body=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 103 | <p class="firstline">Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.</p> |
| 104 | <h3>Method Details</h3> |
| 105 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | <code class="details" id="cancel">cancel(projectId, jobId, location=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 107 | <pre>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. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 108 | |
| 109 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 110 | projectId: string, [Required] Project ID of the job to cancel (required) |
| 111 | jobId: string, [Required] Job ID of the job to cancel (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 112 | 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. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 113 | |
| 114 | Returns: |
| 115 | An object of the form: |
| 116 | |
| 117 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 118 | "kind": "bigquery#jobCancelResponse", # The resource type of the response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 119 | "job": { # The final state of the job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 120 | "id": "A String", # [Output-only] Opaque ID field of the job |
| 121 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 122 | "kind": "bigquery#job", # [Output-only] The type of the resource. |
| 123 | "etag": "A String", # [Output-only] A hash of this resource. |
| 124 | "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. |
| 125 | "state": "A String", # [Output-only] Running state of the job. |
| 126 | "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 completed or was unsuccessful. |
| 127 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 128 | "reason": "A String", # A short error code that summarizes the error. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 129 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 130 | "location": "A String", # Specifies where the error occurred, if present. |
| 131 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 132 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 133 | ], |
| 134 | "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
| 135 | "reason": "A String", # A short error code that summarizes the error. |
| 136 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 137 | "location": "A String", # Specifies where the error occurred, if present. |
| 138 | "message": "A String", # A human-readable description of the error. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 139 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 140 | }, |
| 141 | "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job. |
| 142 | "startTime": "A String", # [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. |
| 143 | "completionRatio": 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
| 144 | "rowLevelSecurityStatistics": { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs. |
| 145 | "rowLevelSecurityApplied": True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 146 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 147 | "numChildJobs": "A String", # [Output-only] Number of child jobs executed. |
| 148 | "extract": { # [Output-only] Statistics for an extract job. |
| 149 | "inputBytes": "A String", # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes. |
| 150 | "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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 151 | "A String", |
| 152 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 153 | }, |
| 154 | "transactionInfoTemplate": { # [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one. |
| 155 | "transactionId": "A String", # [Output-only] // [Alpha] Id of the transaction. |
| 156 | }, |
| 157 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 158 | { |
| 159 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 160 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 161 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 162 | ], |
| 163 | "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
| 164 | "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. |
| 165 | "reservation_id": "A 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. |
| 166 | "endTime": "A String", # [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. |
| 167 | "query": { # [Output-only] Statistics for a query job. |
| 168 | "undeclaredQueryParameters": [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 169 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 170 | "parameterValue": { # [Required] The value of this parameter. |
| 171 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 172 | # Object with schema name: QueryParameterValue |
| 173 | ], |
| 174 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 175 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 176 | "a_key": # Object with schema name: QueryParameterValue |
| 177 | }, |
| 178 | }, |
| 179 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 180 | "parameterType": { # [Required] The type of this parameter. |
| 181 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 182 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 183 | { |
| 184 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 185 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 186 | "name": "A String", # [Optional] The name of this field. |
| 187 | }, |
| 188 | ], |
| 189 | "type": "A String", # [Required] The top level type of this field. |
| 190 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 191 | }, |
| 192 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 193 | "ddlOperationPerformed": "A 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. |
| 194 | "schema": { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
| 195 | "fields": [ # Describes the fields in a table. |
| 196 | { |
| 197 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 198 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 199 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 200 | "A String", |
| 201 | ], |
| 202 | }, |
| 203 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 204 | # Object with schema name: TableFieldSchema |
| 205 | ], |
| 206 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 207 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 208 | "policyTags": { |
| 209 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 210 | "A String", |
| 211 | ], |
| 212 | }, |
| 213 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 214 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 215 | ], |
| 216 | }, |
| 217 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 218 | "modelTrainingCurrentIteration": 42, # [Output-only, Beta] Deprecated; do not use. |
| 219 | "billingTier": 42, # [Output-only] Billing tier for the job. |
| 220 | "estimatedBytesProcessed": "A String", # [Output-only] The original estimate of bytes processed for the job. |
| 221 | "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job. |
| 222 | "statementType": "A 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. "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. |
| 223 | "ddlAffectedRowAccessPolicyCount": "A String", # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
| 224 | "referencedTables": [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
| 225 | { |
| 226 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 227 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 228 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 229 | }, |
| 230 | ], |
| 231 | "totalPartitionsProcessed": "A String", # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job. |
| 232 | "ddlTargetTable": { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
| 233 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 234 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 235 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 236 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 237 | "referencedRoutines": [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job. |
| 238 | { |
| 239 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 240 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 241 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 242 | }, |
| 243 | ], |
| 244 | "timeline": [ # [Output-only] [Beta] Describes a timeline of job execution. |
| 245 | { |
| 246 | "activeUnits": "A String", # Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
| 247 | "completedUnits": "A String", # Total parallel units of work completed by this query. |
| 248 | "pendingUnits": "A String", # Total parallel units of work remaining for the active stages. |
| 249 | "totalSlotMs": "A String", # Cumulative slot-ms consumed by the query. |
| 250 | "elapsedMs": "A String", # Milliseconds elapsed since the start of query execution. |
| 251 | }, |
| 252 | ], |
| 253 | "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job. |
| 254 | "modelTraining": { # [Output-only, Beta] Information about create model query job progress. |
| 255 | "expectedTotalIterations": "A String", # [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop. |
| 256 | "currentIteration": 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 257 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 258 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 259 | "queryPlan": [ # [Output-only] Describes execution plan for the query. |
| 260 | { |
| 261 | "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks. |
| 262 | "waitMsMax": "A String", # Milliseconds the slowest shard spent waiting to be scheduled. |
| 263 | "shuffleOutputBytes": "A String", # Total number of bytes written to shuffle. |
| 264 | "computeMsAvg": "A String", # Milliseconds the average shard spent on CPU-bound tasks. |
| 265 | "writeMsMax": "A String", # Milliseconds the slowest shard spent on writing output. |
| 266 | "waitMsAvg": "A String", # Milliseconds the average shard spent waiting to be scheduled. |
| 267 | "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks. |
| 268 | "writeMsAvg": "A String", # Milliseconds the average shard spent on writing output. |
| 269 | "slotMs": "A String", # Slot-milliseconds used by the stage. |
| 270 | "readMsAvg": "A String", # Milliseconds the average shard spent reading input. |
| 271 | "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled. |
| 272 | "shuffleOutputBytesSpilled": "A String", # Total number of bytes written to shuffle and spilled to disk. |
| 273 | "startMs": "A String", # Stage start time represented as milliseconds since epoch. |
| 274 | "completedParallelInputs": "A String", # Number of parallel input segments completed. |
| 275 | "recordsRead": "A String", # Number of records read into the stage. |
| 276 | "inputStages": [ # IDs for stages that are inputs to this stage. |
| 277 | "A String", |
| 278 | ], |
| 279 | "computeMsMax": "A String", # Milliseconds the slowest shard spent on CPU-bound tasks. |
| 280 | "id": "A String", # Unique ID for stage within plan. |
| 281 | "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input. |
| 282 | "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output. |
| 283 | "readMsMax": "A String", # Milliseconds the slowest shard spent reading input. |
| 284 | "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input. |
| 285 | "status": "A String", # Current status for the stage. |
| 286 | "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled. |
| 287 | "name": "A String", # Human-readable name for stage. |
| 288 | "endMs": "A String", # Stage end time represented as milliseconds since epoch. |
| 289 | "parallelInputs": "A String", # Number of parallel input segments to be processed. |
| 290 | "recordsWritten": "A String", # Number of records written by the stage. |
| 291 | "steps": [ # List of operations within the stage in dependency order (approximately chronological). |
| 292 | { |
| 293 | "kind": "A String", # Machine-readable operation type. |
| 294 | "substeps": [ # Human-readable stage descriptions. |
| 295 | "A String", |
| 296 | ], |
| 297 | }, |
| 298 | ], |
| 299 | "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output. |
| 300 | }, |
| 301 | ], |
| 302 | "totalBytesProcessedAccuracy": "A 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. |
| 303 | "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache. |
| 304 | "modelTrainingExpectedTotalIteration": "A String", # [Output-only, Beta] Deprecated; do not use. |
| 305 | "ddlTargetRowAccessPolicy": { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
| 306 | "policyId": "A String", # [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 307 | "datasetId": "A String", # [Required] The ID of the dataset containing this row access policy. |
| 308 | "tableId": "A String", # [Required] The ID of the table containing this row access policy. |
| 309 | "projectId": "A String", # [Required] The ID of the project containing this row access policy. |
| 310 | }, |
| 311 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 312 | { |
| 313 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 314 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
| 315 | }, |
| 316 | ], |
| 317 | "ddlTargetRoutine": { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
| 318 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 319 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 320 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 321 | }, |
| 322 | }, |
| 323 | "quotaDeferments": [ # [Output-only] Quotas which delayed this job's start time. |
| 324 | "A String", |
| 325 | ], |
| 326 | "scriptStatistics": { # [Output-only] Statistics for a child job of a script. |
| 327 | "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. |
| 328 | { |
| 329 | "procedureId": "A String", # [Output-only] Name of the active procedure, empty if in a top-level script. |
| 330 | "startColumn": 42, # [Output-only] One-based start column. |
| 331 | "startLine": 42, # [Output-only] One-based start line. |
| 332 | "endColumn": 42, # [Output-only] One-based end column. |
| 333 | "endLine": 42, # [Output-only] One-based end line. |
| 334 | "text": "A String", # [Output-only] Text of the current statement/expression. |
| 335 | }, |
| 336 | ], |
| 337 | "evaluationKind": "A String", # [Output-only] Whether this child job was a statement or expression. |
| 338 | }, |
| 339 | "parentJobId": "A String", # [Output-only] If this is a child job, the id of the parent. |
| 340 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 341 | "load": { # [Output-only] Statistics for a load job. |
| 342 | "outputRows": "A String", # [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. |
| 343 | "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job. |
| 344 | "badRecords": "A String", # [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. |
| 345 | "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
| 346 | "inputFiles": "A String", # [Output-only] Number of source files in a load job. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 347 | }, |
| 348 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 349 | "user_email": "A String", # [Output-only] Email address of the user who ran the job. |
| 350 | "jobReference": { # [Optional] Reference describing the unique-per-user name of the job. |
| 351 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 352 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 353 | "jobId": "A 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. |
| 354 | }, |
| 355 | "configuration": { # [Required] Describes the job configuration. |
| 356 | "extract": { # [Pick one] Configures an extract job. |
| 357 | "compression": "A 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. Not applicable when extracting models. |
| 358 | "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
| 359 | "A String", |
| 360 | ], |
| 361 | "useAvroLogicalTypes": True or False, # [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models. |
| 362 | "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL. |
| 363 | "sourceTable": { # A reference to the table being exported. |
| 364 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 365 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 366 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 367 | }, |
| 368 | "destinationUri": "A 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. |
| 369 | "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models. |
| 370 | "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
| 371 | "sourceModel": { # A reference to the model being exported. |
| 372 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 373 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 374 | "modelId": "A String", # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 375 | }, |
| 376 | }, |
| 377 | "dryRun": True or False, # [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. |
| 378 | "load": { # [Pick one] Configures a load job. |
| 379 | "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 380 | "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. |
| 381 | "fields": [ # Describes the fields in a table. |
| 382 | { |
| 383 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 384 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 385 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 386 | "A String", |
| 387 | ], |
| 388 | }, |
| 389 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 390 | # Object with schema name: TableFieldSchema |
| 391 | ], |
| 392 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 393 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 394 | "policyTags": { |
| 395 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 396 | "A String", |
| 397 | ], |
| 398 | }, |
| 399 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 400 | }, |
| 401 | ], |
| 402 | }, |
| 403 | "decimalTargetTypes": [ # [Trusted Tester] 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. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. 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. |
| 404 | "A String", |
| 405 | ], |
| 406 | "skipLeadingRows": 42, # [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. |
| 407 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 408 | "requirePartitionFilter": True or False, |
| 409 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 410 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 411 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 412 | }, |
| 413 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 414 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 415 | }, |
| 416 | "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: 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. |
| 417 | "A String", |
| 418 | ], |
| 419 | "destinationTable": { # [Required] The destination table to load the data into. |
| 420 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 421 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 422 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 423 | }, |
| 424 | "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
| 425 | "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. |
| 426 | "A String", |
| 427 | ], |
| 428 | "maxBadRecords": 42, # [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. |
| 429 | "allowJaggedRows": True or False, # [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. |
| 430 | "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property. |
| 431 | "autodetect": True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
| 432 | "encoding": "A 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. |
| 433 | "destinationTableProperties": { # [Beta] [Optional] Properties with which to create the destination table if it is new. |
| 434 | "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. |
| 435 | "a_key": "A String", |
| 436 | }, |
| 437 | "description": "A 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. |
| 438 | "friendlyName": "A String", # [Optional] The friendly name 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 friendly name is provided, the job will fail. |
| 439 | }, |
| 440 | "createDisposition": "A 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. |
| 441 | "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. |
| 442 | "A String", |
| 443 | ], |
| 444 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 445 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 446 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 447 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 448 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 449 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 450 | }, |
| 451 | }, |
| 452 | "useAvroLogicalTypes": True or False, # [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). |
| 453 | "ignoreUnknownValues": True or False, # [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 |
| 454 | "sourceFormat": "A 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. |
| 455 | "fieldDelimiter": "A 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 (','). |
| 456 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 457 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 458 | "A String", |
| 459 | ], |
| 460 | }, |
| 461 | "nullMarker": "A 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. |
| 462 | "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. |
| 463 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 464 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 465 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 466 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 467 | }, |
| 468 | "writeDisposition": "A 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. |
| 469 | }, |
| 470 | "jobType": "A String", # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
| 471 | "query": { # [Pick one] Configures a query job. |
| 472 | "query": "A String", # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
| 473 | "flattenResults": true, # [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. |
| 474 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 475 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 476 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 477 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 478 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 479 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 480 | }, |
| 481 | }, |
| 482 | "maximumBillingTier": 1, # [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. |
| 483 | "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
| 484 | "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size. |
| 485 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 486 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 487 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 488 | }, |
| 489 | "tableDefinitions": { # [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. |
| 490 | "a_key": { |
| 491 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 492 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 493 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 494 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 495 | }, |
| 496 | "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. |
| 497 | "fields": [ # Describes the fields in a table. |
| 498 | { |
| 499 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 500 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 501 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 502 | "A String", |
| 503 | ], |
| 504 | }, |
| 505 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 506 | # Object with schema name: TableFieldSchema |
| 507 | ], |
| 508 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 509 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 510 | "policyTags": { |
| 511 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 512 | "A String", |
| 513 | ], |
| 514 | }, |
| 515 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 516 | }, |
| 517 | ], |
| 518 | }, |
| 519 | "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 520 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 521 | "readRowkeyAsString": True or False, # [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false. |
| 522 | "ignoreUnspecifiedColumnFamilies": True or False, # [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. |
| 523 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 524 | { |
| 525 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 526 | "onlyReadLatest": True or False, # [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. |
| 527 | "familyId": "A String", # Identifier of the column family. |
| 528 | "columns": [ # [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. |
| 529 | { |
| 530 | "fieldName": "A String", # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. |
| 531 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 532 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 533 | "qualifierString": "A String", |
| 534 | "qualifierEncoded": "A String", # [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 535 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 536 | }, |
| 537 | ], |
| 538 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 539 | }, |
| 540 | ], |
| 541 | }, |
| 542 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 543 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 544 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 545 | "ignoreUnknownValues": True or False, # [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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. |
| 546 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 547 | "encoding": "A 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. |
| 548 | "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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. |
| 549 | "fieldDelimiter": "A String", # [Optional] The separator for fields 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). |
| 550 | "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. |
| 551 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 552 | "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 553 | }, |
| 554 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 555 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 556 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 557 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 558 | }, |
| 559 | "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. |
| 560 | "A String", |
| 561 | ], |
| 562 | }, |
| 563 | }, |
| 564 | "queryParameters": [ # Query parameters for standard SQL queries. |
| 565 | { |
| 566 | "parameterValue": { # [Required] The value of this parameter. |
| 567 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 568 | # Object with schema name: QueryParameterValue |
| 569 | ], |
| 570 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 571 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 572 | "a_key": # Object with schema name: QueryParameterValue |
| 573 | }, |
| 574 | }, |
| 575 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 576 | "parameterType": { # [Required] The type of this parameter. |
| 577 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 578 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 579 | { |
| 580 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 581 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 582 | "name": "A String", # [Optional] The name of this field. |
| 583 | }, |
| 584 | ], |
| 585 | "type": "A String", # [Required] The top level type of this field. |
| 586 | }, |
| 587 | }, |
| 588 | ], |
| 589 | "allowLargeResults": false, # [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. |
| 590 | "maximumBytesBilled": "A String", # [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. |
| 591 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 592 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 593 | }, |
| 594 | "useLegacySql": true, # 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. |
| 595 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 596 | "connectionProperties": [ # Connection properties. |
| 597 | { |
| 598 | "key": "A String", # [Required] Name of the connection property to set. |
| 599 | "value": "A String", # [Required] Value of the connection property. |
| 600 | }, |
| 601 | ], |
| 602 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 603 | "requirePartitionFilter": True or False, |
| 604 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 605 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 606 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 607 | }, |
| 608 | "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: 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. |
| 609 | "A String", |
| 610 | ], |
| 611 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
| 612 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 613 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 614 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 615 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 616 | }, |
| 617 | ], |
| 618 | "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. |
| 619 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 620 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
| 621 | }, |
| 622 | "useQueryCache": true, # [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. |
| 623 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 624 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 625 | "A String", |
| 626 | ], |
| 627 | }, |
| 628 | "createDisposition": "A 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. |
| 629 | "writeDisposition": "A 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. |
| 630 | }, |
| 631 | "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. |
| 632 | "a_key": "A String", |
| 633 | }, |
| 634 | "jobTimeoutMs": "A String", # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job. |
| 635 | "copy": { # [Pick one] Copies a table. |
| 636 | "sourceTable": { # [Pick one] Source table to copy. |
| 637 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 638 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 639 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 640 | }, |
| 641 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 642 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 643 | }, |
| 644 | "destinationTable": { # [Required] The destination table |
| 645 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 646 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 647 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 648 | }, |
| 649 | "operationType": "A String", # [Optional] Supported operation types in table copy job. |
| 650 | "writeDisposition": "A 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. |
| 651 | "destinationExpirationTime": "", # [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed. |
| 652 | "sourceTables": [ # [Pick one] Source tables to copy. |
| 653 | { |
| 654 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 655 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 656 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 657 | }, |
| 658 | ], |
| 659 | "createDisposition": "A 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. |
| 660 | }, |
| 661 | }, |
| 662 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 663 | }</pre> |
| 664 | </div> |
| 665 | |
| 666 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 667 | <code class="details" id="close">close()</code> |
| 668 | <pre>Close httplib2 connections.</pre> |
| 669 | </div> |
| 670 | |
| 671 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 672 | <code class="details" id="get">get(projectId, jobId, location=None)</code> |
| 673 | <pre>Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. |
| 674 | |
| 675 | Args: |
| 676 | projectId: string, [Required] Project ID of the requested job (required) |
| 677 | jobId: string, [Required] Job ID of the requested job (required) |
| 678 | 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. |
| 679 | |
| 680 | Returns: |
| 681 | An object of the form: |
| 682 | |
| 683 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 684 | "id": "A String", # [Output-only] Opaque ID field of the job |
| 685 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 686 | "kind": "bigquery#job", # [Output-only] The type of the resource. |
| 687 | "etag": "A String", # [Output-only] A hash of this resource. |
| 688 | "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. |
| 689 | "state": "A String", # [Output-only] Running state of the job. |
| 690 | "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 completed or was unsuccessful. |
| 691 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 692 | "reason": "A String", # A short error code that summarizes the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 693 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 694 | "location": "A String", # Specifies where the error occurred, if present. |
| 695 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 696 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 697 | ], |
| 698 | "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
| 699 | "reason": "A String", # A short error code that summarizes the error. |
| 700 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 701 | "location": "A String", # Specifies where the error occurred, if present. |
| 702 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 703 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 704 | }, |
| 705 | "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job. |
| 706 | "startTime": "A String", # [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. |
| 707 | "completionRatio": 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
| 708 | "rowLevelSecurityStatistics": { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs. |
| 709 | "rowLevelSecurityApplied": True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 710 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 711 | "numChildJobs": "A String", # [Output-only] Number of child jobs executed. |
| 712 | "extract": { # [Output-only] Statistics for an extract job. |
| 713 | "inputBytes": "A String", # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes. |
| 714 | "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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 715 | "A String", |
| 716 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 717 | }, |
| 718 | "transactionInfoTemplate": { # [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one. |
| 719 | "transactionId": "A String", # [Output-only] // [Alpha] Id of the transaction. |
| 720 | }, |
| 721 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 722 | { |
| 723 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 724 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 725 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 726 | ], |
| 727 | "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
| 728 | "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. |
| 729 | "reservation_id": "A 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. |
| 730 | "endTime": "A String", # [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. |
| 731 | "query": { # [Output-only] Statistics for a query job. |
| 732 | "undeclaredQueryParameters": [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 733 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 734 | "parameterValue": { # [Required] The value of this parameter. |
| 735 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 736 | # Object with schema name: QueryParameterValue |
| 737 | ], |
| 738 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 739 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 740 | "a_key": # Object with schema name: QueryParameterValue |
| 741 | }, |
| 742 | }, |
| 743 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 744 | "parameterType": { # [Required] The type of this parameter. |
| 745 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 746 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 747 | { |
| 748 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 749 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 750 | "name": "A String", # [Optional] The name of this field. |
| 751 | }, |
| 752 | ], |
| 753 | "type": "A String", # [Required] The top level type of this field. |
| 754 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 755 | }, |
| 756 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 757 | "ddlOperationPerformed": "A 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. |
| 758 | "schema": { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
| 759 | "fields": [ # Describes the fields in a table. |
| 760 | { |
| 761 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 762 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 763 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 764 | "A String", |
| 765 | ], |
| 766 | }, |
| 767 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 768 | # Object with schema name: TableFieldSchema |
| 769 | ], |
| 770 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 771 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 772 | "policyTags": { |
| 773 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 774 | "A String", |
| 775 | ], |
| 776 | }, |
| 777 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 778 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 779 | ], |
| 780 | }, |
| 781 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 782 | "modelTrainingCurrentIteration": 42, # [Output-only, Beta] Deprecated; do not use. |
| 783 | "billingTier": 42, # [Output-only] Billing tier for the job. |
| 784 | "estimatedBytesProcessed": "A String", # [Output-only] The original estimate of bytes processed for the job. |
| 785 | "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job. |
| 786 | "statementType": "A 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. "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. |
| 787 | "ddlAffectedRowAccessPolicyCount": "A String", # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
| 788 | "referencedTables": [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
| 789 | { |
| 790 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 791 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 792 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 793 | }, |
| 794 | ], |
| 795 | "totalPartitionsProcessed": "A String", # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job. |
| 796 | "ddlTargetTable": { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
| 797 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 798 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 799 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 800 | }, |
| 801 | "referencedRoutines": [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job. |
| 802 | { |
| 803 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 804 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 805 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 806 | }, |
| 807 | ], |
| 808 | "timeline": [ # [Output-only] [Beta] Describes a timeline of job execution. |
| 809 | { |
| 810 | "activeUnits": "A String", # Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
| 811 | "completedUnits": "A String", # Total parallel units of work completed by this query. |
| 812 | "pendingUnits": "A String", # Total parallel units of work remaining for the active stages. |
| 813 | "totalSlotMs": "A String", # Cumulative slot-ms consumed by the query. |
| 814 | "elapsedMs": "A String", # Milliseconds elapsed since the start of query execution. |
| 815 | }, |
| 816 | ], |
| 817 | "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job. |
| 818 | "modelTraining": { # [Output-only, Beta] Information about create model query job progress. |
| 819 | "expectedTotalIterations": "A String", # [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop. |
| 820 | "currentIteration": 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress. |
| 821 | }, |
| 822 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 823 | "queryPlan": [ # [Output-only] Describes execution plan for the query. |
| 824 | { |
| 825 | "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks. |
| 826 | "waitMsMax": "A String", # Milliseconds the slowest shard spent waiting to be scheduled. |
| 827 | "shuffleOutputBytes": "A String", # Total number of bytes written to shuffle. |
| 828 | "computeMsAvg": "A String", # Milliseconds the average shard spent on CPU-bound tasks. |
| 829 | "writeMsMax": "A String", # Milliseconds the slowest shard spent on writing output. |
| 830 | "waitMsAvg": "A String", # Milliseconds the average shard spent waiting to be scheduled. |
| 831 | "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks. |
| 832 | "writeMsAvg": "A String", # Milliseconds the average shard spent on writing output. |
| 833 | "slotMs": "A String", # Slot-milliseconds used by the stage. |
| 834 | "readMsAvg": "A String", # Milliseconds the average shard spent reading input. |
| 835 | "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled. |
| 836 | "shuffleOutputBytesSpilled": "A String", # Total number of bytes written to shuffle and spilled to disk. |
| 837 | "startMs": "A String", # Stage start time represented as milliseconds since epoch. |
| 838 | "completedParallelInputs": "A String", # Number of parallel input segments completed. |
| 839 | "recordsRead": "A String", # Number of records read into the stage. |
| 840 | "inputStages": [ # IDs for stages that are inputs to this stage. |
| 841 | "A String", |
| 842 | ], |
| 843 | "computeMsMax": "A String", # Milliseconds the slowest shard spent on CPU-bound tasks. |
| 844 | "id": "A String", # Unique ID for stage within plan. |
| 845 | "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input. |
| 846 | "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output. |
| 847 | "readMsMax": "A String", # Milliseconds the slowest shard spent reading input. |
| 848 | "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input. |
| 849 | "status": "A String", # Current status for the stage. |
| 850 | "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled. |
| 851 | "name": "A String", # Human-readable name for stage. |
| 852 | "endMs": "A String", # Stage end time represented as milliseconds since epoch. |
| 853 | "parallelInputs": "A String", # Number of parallel input segments to be processed. |
| 854 | "recordsWritten": "A String", # Number of records written by the stage. |
| 855 | "steps": [ # List of operations within the stage in dependency order (approximately chronological). |
| 856 | { |
| 857 | "kind": "A String", # Machine-readable operation type. |
| 858 | "substeps": [ # Human-readable stage descriptions. |
| 859 | "A String", |
| 860 | ], |
| 861 | }, |
| 862 | ], |
| 863 | "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output. |
| 864 | }, |
| 865 | ], |
| 866 | "totalBytesProcessedAccuracy": "A 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. |
| 867 | "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache. |
| 868 | "modelTrainingExpectedTotalIteration": "A String", # [Output-only, Beta] Deprecated; do not use. |
| 869 | "ddlTargetRowAccessPolicy": { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
| 870 | "policyId": "A String", # [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 871 | "datasetId": "A String", # [Required] The ID of the dataset containing this row access policy. |
| 872 | "tableId": "A String", # [Required] The ID of the table containing this row access policy. |
| 873 | "projectId": "A String", # [Required] The ID of the project containing this row access policy. |
| 874 | }, |
| 875 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 876 | { |
| 877 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 878 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
| 879 | }, |
| 880 | ], |
| 881 | "ddlTargetRoutine": { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
| 882 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 883 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 884 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 885 | }, |
| 886 | }, |
| 887 | "quotaDeferments": [ # [Output-only] Quotas which delayed this job's start time. |
| 888 | "A String", |
| 889 | ], |
| 890 | "scriptStatistics": { # [Output-only] Statistics for a child job of a script. |
| 891 | "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. |
| 892 | { |
| 893 | "procedureId": "A String", # [Output-only] Name of the active procedure, empty if in a top-level script. |
| 894 | "startColumn": 42, # [Output-only] One-based start column. |
| 895 | "startLine": 42, # [Output-only] One-based start line. |
| 896 | "endColumn": 42, # [Output-only] One-based end column. |
| 897 | "endLine": 42, # [Output-only] One-based end line. |
| 898 | "text": "A String", # [Output-only] Text of the current statement/expression. |
| 899 | }, |
| 900 | ], |
| 901 | "evaluationKind": "A String", # [Output-only] Whether this child job was a statement or expression. |
| 902 | }, |
| 903 | "parentJobId": "A String", # [Output-only] If this is a child job, the id of the parent. |
| 904 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 905 | "load": { # [Output-only] Statistics for a load job. |
| 906 | "outputRows": "A String", # [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. |
| 907 | "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job. |
| 908 | "badRecords": "A String", # [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. |
| 909 | "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
| 910 | "inputFiles": "A String", # [Output-only] Number of source files in a load job. |
| 911 | }, |
| 912 | }, |
| 913 | "user_email": "A String", # [Output-only] Email address of the user who ran the job. |
| 914 | "jobReference": { # [Optional] Reference describing the unique-per-user name of the job. |
| 915 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 916 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 917 | "jobId": "A 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. |
| 918 | }, |
| 919 | "configuration": { # [Required] Describes the job configuration. |
| 920 | "extract": { # [Pick one] Configures an extract job. |
| 921 | "compression": "A 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. Not applicable when extracting models. |
| 922 | "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
| 923 | "A String", |
| 924 | ], |
| 925 | "useAvroLogicalTypes": True or False, # [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models. |
| 926 | "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL. |
| 927 | "sourceTable": { # A reference to the table being exported. |
| 928 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 929 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 930 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 931 | }, |
| 932 | "destinationUri": "A 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. |
| 933 | "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models. |
| 934 | "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
| 935 | "sourceModel": { # A reference to the model being exported. |
| 936 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 937 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 938 | "modelId": "A String", # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 939 | }, |
| 940 | }, |
| 941 | "dryRun": True or False, # [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. |
| 942 | "load": { # [Pick one] Configures a load job. |
| 943 | "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 944 | "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. |
| 945 | "fields": [ # Describes the fields in a table. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 946 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 947 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 948 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 949 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 950 | "A String", |
| 951 | ], |
| 952 | }, |
| 953 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 954 | # Object with schema name: TableFieldSchema |
| 955 | ], |
| 956 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 957 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 958 | "policyTags": { |
| 959 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 960 | "A String", |
| 961 | ], |
| 962 | }, |
| 963 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 964 | }, |
| 965 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 966 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 967 | "decimalTargetTypes": [ # [Trusted Tester] 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. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. 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. |
| 968 | "A String", |
| 969 | ], |
| 970 | "skipLeadingRows": 42, # [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. |
| 971 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 972 | "requirePartitionFilter": True or False, |
| 973 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 974 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 975 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 976 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 977 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 978 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 979 | }, |
| 980 | "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: 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. |
| 981 | "A String", |
| 982 | ], |
| 983 | "destinationTable": { # [Required] The destination table to load the data into. |
| 984 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 985 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 986 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 987 | }, |
| 988 | "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
| 989 | "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. |
| 990 | "A String", |
| 991 | ], |
| 992 | "maxBadRecords": 42, # [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. |
| 993 | "allowJaggedRows": True or False, # [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. |
| 994 | "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property. |
| 995 | "autodetect": True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
| 996 | "encoding": "A 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. |
| 997 | "destinationTableProperties": { # [Beta] [Optional] Properties with which to create the destination table if it is new. |
| 998 | "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. |
| 999 | "a_key": "A String", |
| 1000 | }, |
| 1001 | "description": "A 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. |
| 1002 | "friendlyName": "A String", # [Optional] The friendly name 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 friendly name is provided, the job will fail. |
| 1003 | }, |
| 1004 | "createDisposition": "A 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. |
| 1005 | "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. |
| 1006 | "A String", |
| 1007 | ], |
| 1008 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1009 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 1010 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1011 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1012 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1013 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1014 | }, |
| 1015 | }, |
| 1016 | "useAvroLogicalTypes": True or False, # [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). |
| 1017 | "ignoreUnknownValues": True or False, # [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 |
| 1018 | "sourceFormat": "A 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. |
| 1019 | "fieldDelimiter": "A 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 (','). |
| 1020 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1021 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 1022 | "A String", |
| 1023 | ], |
| 1024 | }, |
| 1025 | "nullMarker": "A 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. |
| 1026 | "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. |
| 1027 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1028 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1029 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1030 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1031 | }, |
| 1032 | "writeDisposition": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1033 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1034 | "jobType": "A String", # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
| 1035 | "query": { # [Pick one] Configures a query job. |
| 1036 | "query": "A String", # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
| 1037 | "flattenResults": true, # [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. |
| 1038 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1039 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 1040 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1041 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1042 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1043 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1044 | }, |
| 1045 | }, |
| 1046 | "maximumBillingTier": 1, # [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. |
| 1047 | "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
| 1048 | "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size. |
| 1049 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1050 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1051 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1052 | }, |
| 1053 | "tableDefinitions": { # [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. |
| 1054 | "a_key": { |
| 1055 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1056 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1057 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1058 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1059 | }, |
| 1060 | "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. |
| 1061 | "fields": [ # Describes the fields in a table. |
| 1062 | { |
| 1063 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1064 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1065 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1066 | "A String", |
| 1067 | ], |
| 1068 | }, |
| 1069 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1070 | # Object with schema name: TableFieldSchema |
| 1071 | ], |
| 1072 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1073 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1074 | "policyTags": { |
| 1075 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1076 | "A String", |
| 1077 | ], |
| 1078 | }, |
| 1079 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1080 | }, |
| 1081 | ], |
| 1082 | }, |
| 1083 | "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1084 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1085 | "readRowkeyAsString": True or False, # [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false. |
| 1086 | "ignoreUnspecifiedColumnFamilies": True or False, # [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. |
| 1087 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1088 | { |
| 1089 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1090 | "onlyReadLatest": True or False, # [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. |
| 1091 | "familyId": "A String", # Identifier of the column family. |
| 1092 | "columns": [ # [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. |
| 1093 | { |
| 1094 | "fieldName": "A String", # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. |
| 1095 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1096 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1097 | "qualifierString": "A String", |
| 1098 | "qualifierEncoded": "A String", # [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 1099 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1100 | }, |
| 1101 | ], |
| 1102 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1103 | }, |
| 1104 | ], |
| 1105 | }, |
| 1106 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1107 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1108 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1109 | "ignoreUnknownValues": True or False, # [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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. |
| 1110 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1111 | "encoding": "A 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. |
| 1112 | "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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. |
| 1113 | "fieldDelimiter": "A String", # [Optional] The separator for fields 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). |
| 1114 | "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. |
| 1115 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1116 | "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 1117 | }, |
| 1118 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1119 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1120 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1121 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1122 | }, |
| 1123 | "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. |
| 1124 | "A String", |
| 1125 | ], |
| 1126 | }, |
| 1127 | }, |
| 1128 | "queryParameters": [ # Query parameters for standard SQL queries. |
| 1129 | { |
| 1130 | "parameterValue": { # [Required] The value of this parameter. |
| 1131 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 1132 | # Object with schema name: QueryParameterValue |
| 1133 | ], |
| 1134 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 1135 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 1136 | "a_key": # Object with schema name: QueryParameterValue |
| 1137 | }, |
| 1138 | }, |
| 1139 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 1140 | "parameterType": { # [Required] The type of this parameter. |
| 1141 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 1142 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 1143 | { |
| 1144 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 1145 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 1146 | "name": "A String", # [Optional] The name of this field. |
| 1147 | }, |
| 1148 | ], |
| 1149 | "type": "A String", # [Required] The top level type of this field. |
| 1150 | }, |
| 1151 | }, |
| 1152 | ], |
| 1153 | "allowLargeResults": false, # [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. |
| 1154 | "maximumBytesBilled": "A String", # [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. |
| 1155 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1156 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1157 | }, |
| 1158 | "useLegacySql": true, # 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. |
| 1159 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 1160 | "connectionProperties": [ # Connection properties. |
| 1161 | { |
| 1162 | "key": "A String", # [Required] Name of the connection property to set. |
| 1163 | "value": "A String", # [Required] Value of the connection property. |
| 1164 | }, |
| 1165 | ], |
| 1166 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1167 | "requirePartitionFilter": True or False, |
| 1168 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 1169 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 1170 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 1171 | }, |
| 1172 | "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: 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. |
| 1173 | "A String", |
| 1174 | ], |
| 1175 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
| 1176 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 1177 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 1178 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 1179 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 1180 | }, |
| 1181 | ], |
| 1182 | "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. |
| 1183 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1184 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
| 1185 | }, |
| 1186 | "useQueryCache": true, # [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. |
| 1187 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1188 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 1189 | "A String", |
| 1190 | ], |
| 1191 | }, |
| 1192 | "createDisposition": "A 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. |
| 1193 | "writeDisposition": "A 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. |
| 1194 | }, |
| 1195 | "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. |
| 1196 | "a_key": "A String", |
| 1197 | }, |
| 1198 | "jobTimeoutMs": "A String", # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job. |
| 1199 | "copy": { # [Pick one] Copies a table. |
| 1200 | "sourceTable": { # [Pick one] Source table to copy. |
| 1201 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1202 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1203 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1204 | }, |
| 1205 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1206 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1207 | }, |
| 1208 | "destinationTable": { # [Required] The destination table |
| 1209 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1210 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1211 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1212 | }, |
| 1213 | "operationType": "A String", # [Optional] Supported operation types in table copy job. |
| 1214 | "writeDisposition": "A 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. |
| 1215 | "destinationExpirationTime": "", # [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed. |
| 1216 | "sourceTables": [ # [Pick one] Source tables to copy. |
| 1217 | { |
| 1218 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1219 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1220 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1221 | }, |
| 1222 | ], |
| 1223 | "createDisposition": "A 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. |
| 1224 | }, |
| 1225 | }, |
| 1226 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1227 | </div> |
| 1228 | |
| 1229 | <div class="method"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1230 | <code class="details" id="getQueryResults">getQueryResults(projectId, jobId, maxResults=None, startIndex=None, pageToken=None, location=None, timeoutMs=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1231 | <pre>Retrieves the results of a query job. |
| 1232 | |
| 1233 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1234 | projectId: string, [Required] Project ID of the query job (required) |
| 1235 | jobId: string, [Required] Job ID of the query job (required) |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1236 | maxResults: integer, Maximum number of results to read |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1237 | startIndex: string, Zero-based index of the starting row |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1238 | pageToken: string, Page token, returned by a previous call, to request the next page of results |
| 1239 | location: string, The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1240 | timeoutMs: integer, How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1241 | |
| 1242 | Returns: |
| 1243 | An object of the form: |
| 1244 | |
| 1245 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1246 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 1247 | "totalBytesProcessed": "A String", # The total number of bytes processed for this query. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1248 | "schema": { # The schema of the results. Present only when the query completes successfully. |
| 1249 | "fields": [ # Describes the fields in a table. |
| 1250 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1251 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1252 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1253 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1254 | "A String", |
| 1255 | ], |
| 1256 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1257 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1258 | # Object with schema name: TableFieldSchema |
| 1259 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1260 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1261 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1262 | "policyTags": { |
| 1263 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1264 | "A String", |
| 1265 | ], |
| 1266 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1267 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1268 | }, |
| 1269 | ], |
| 1270 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1271 | "jobComplete": True or False, # Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1272 | "errors": [ # [Output-only] The first errors or warnings 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 completed or was unsuccessful. |
| 1273 | { |
| 1274 | "reason": "A String", # A short error code that summarizes the error. |
| 1275 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 1276 | "location": "A String", # Specifies where the error occurred, if present. |
| 1277 | "message": "A String", # A human-readable description of the error. |
| 1278 | }, |
| 1279 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1280 | "jobReference": { # Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). |
| 1281 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 1282 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 1283 | "jobId": "A 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. |
| 1284 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1285 | "kind": "bigquery#getQueryResultsResponse", # The resource type of the response. |
| 1286 | "etag": "A String", # A hash of this response. |
| 1287 | "totalRows": "A String", # The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully. |
| 1288 | "cacheHit": True or False, # Whether the query result was fetched from the query cache. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1289 | "pageToken": "A String", # A token used for paging results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1290 | "rows": [ # An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully. |
| 1291 | { |
| 1292 | "f": [ # Represents a single row in the result set, consisting of one or more fields. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1293 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1294 | "v": "", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1295 | }, |
| 1296 | ], |
| 1297 | }, |
| 1298 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1299 | }</pre> |
| 1300 | </div> |
| 1301 | |
| 1302 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1303 | <code class="details" id="getQueryResults_next">getQueryResults_next(previous_request, previous_response)</code> |
| 1304 | <pre>Retrieves the next page of results. |
| 1305 | |
| 1306 | Args: |
| 1307 | previous_request: The request for the previous page. (required) |
| 1308 | previous_response: The response from the request for the previous page. (required) |
| 1309 | |
| 1310 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1311 | A request object that you can call 'execute()' on to request the next |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1312 | page. Returns None if there are no more items in the collection. |
| 1313 | </pre> |
| 1314 | </div> |
| 1315 | |
| 1316 | <div class="method"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1317 | <code class="details" id="insert">insert(projectId, body=None, media_body=None, media_mime_type=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1318 | <pre>Starts a new asynchronous job. Requires the Can View project role. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1319 | |
| 1320 | Args: |
| 1321 | projectId: string, Project ID of the project that will be billed for the job (required) |
| 1322 | body: object, The request body. |
| 1323 | The object takes the form of: |
| 1324 | |
| 1325 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1326 | "id": "A String", # [Output-only] Opaque ID field of the job |
| 1327 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 1328 | "kind": "bigquery#job", # [Output-only] The type of the resource. |
| 1329 | "etag": "A String", # [Output-only] A hash of this resource. |
| 1330 | "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. |
| 1331 | "state": "A String", # [Output-only] Running state of the job. |
| 1332 | "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 completed or was unsuccessful. |
| 1333 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1334 | "reason": "A String", # A short error code that summarizes the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1335 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1336 | "location": "A String", # Specifies where the error occurred, if present. |
| 1337 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1338 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1339 | ], |
| 1340 | "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
| 1341 | "reason": "A String", # A short error code that summarizes the error. |
| 1342 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 1343 | "location": "A String", # Specifies where the error occurred, if present. |
| 1344 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1345 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1346 | }, |
| 1347 | "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job. |
| 1348 | "startTime": "A String", # [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. |
| 1349 | "completionRatio": 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
| 1350 | "rowLevelSecurityStatistics": { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs. |
| 1351 | "rowLevelSecurityApplied": True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1352 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1353 | "numChildJobs": "A String", # [Output-only] Number of child jobs executed. |
| 1354 | "extract": { # [Output-only] Statistics for an extract job. |
| 1355 | "inputBytes": "A String", # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes. |
| 1356 | "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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1357 | "A String", |
| 1358 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1359 | }, |
| 1360 | "transactionInfoTemplate": { # [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one. |
| 1361 | "transactionId": "A String", # [Output-only] // [Alpha] Id of the transaction. |
| 1362 | }, |
| 1363 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 1364 | { |
| 1365 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 1366 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1367 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1368 | ], |
| 1369 | "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
| 1370 | "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. |
| 1371 | "reservation_id": "A 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. |
| 1372 | "endTime": "A String", # [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. |
| 1373 | "query": { # [Output-only] Statistics for a query job. |
| 1374 | "undeclaredQueryParameters": [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1375 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1376 | "parameterValue": { # [Required] The value of this parameter. |
| 1377 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 1378 | # Object with schema name: QueryParameterValue |
| 1379 | ], |
| 1380 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 1381 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 1382 | "a_key": # Object with schema name: QueryParameterValue |
| 1383 | }, |
| 1384 | }, |
| 1385 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 1386 | "parameterType": { # [Required] The type of this parameter. |
| 1387 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 1388 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 1389 | { |
| 1390 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 1391 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 1392 | "name": "A String", # [Optional] The name of this field. |
| 1393 | }, |
| 1394 | ], |
| 1395 | "type": "A String", # [Required] The top level type of this field. |
| 1396 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1397 | }, |
| 1398 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1399 | "ddlOperationPerformed": "A 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. |
| 1400 | "schema": { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
| 1401 | "fields": [ # Describes the fields in a table. |
| 1402 | { |
| 1403 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1404 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1405 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1406 | "A String", |
| 1407 | ], |
| 1408 | }, |
| 1409 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1410 | # Object with schema name: TableFieldSchema |
| 1411 | ], |
| 1412 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1413 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1414 | "policyTags": { |
| 1415 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1416 | "A String", |
| 1417 | ], |
| 1418 | }, |
| 1419 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1420 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1421 | ], |
| 1422 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1423 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1424 | "modelTrainingCurrentIteration": 42, # [Output-only, Beta] Deprecated; do not use. |
| 1425 | "billingTier": 42, # [Output-only] Billing tier for the job. |
| 1426 | "estimatedBytesProcessed": "A String", # [Output-only] The original estimate of bytes processed for the job. |
| 1427 | "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job. |
| 1428 | "statementType": "A 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. "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. |
| 1429 | "ddlAffectedRowAccessPolicyCount": "A String", # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
| 1430 | "referencedTables": [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
| 1431 | { |
| 1432 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1433 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1434 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1435 | }, |
| 1436 | ], |
| 1437 | "totalPartitionsProcessed": "A String", # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job. |
| 1438 | "ddlTargetTable": { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
| 1439 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1440 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1441 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1442 | }, |
| 1443 | "referencedRoutines": [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job. |
| 1444 | { |
| 1445 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 1446 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 1447 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 1448 | }, |
| 1449 | ], |
| 1450 | "timeline": [ # [Output-only] [Beta] Describes a timeline of job execution. |
| 1451 | { |
| 1452 | "activeUnits": "A String", # Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
| 1453 | "completedUnits": "A String", # Total parallel units of work completed by this query. |
| 1454 | "pendingUnits": "A String", # Total parallel units of work remaining for the active stages. |
| 1455 | "totalSlotMs": "A String", # Cumulative slot-ms consumed by the query. |
| 1456 | "elapsedMs": "A String", # Milliseconds elapsed since the start of query execution. |
| 1457 | }, |
| 1458 | ], |
| 1459 | "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job. |
| 1460 | "modelTraining": { # [Output-only, Beta] Information about create model query job progress. |
| 1461 | "expectedTotalIterations": "A String", # [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop. |
| 1462 | "currentIteration": 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress. |
| 1463 | }, |
| 1464 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 1465 | "queryPlan": [ # [Output-only] Describes execution plan for the query. |
| 1466 | { |
| 1467 | "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks. |
| 1468 | "waitMsMax": "A String", # Milliseconds the slowest shard spent waiting to be scheduled. |
| 1469 | "shuffleOutputBytes": "A String", # Total number of bytes written to shuffle. |
| 1470 | "computeMsAvg": "A String", # Milliseconds the average shard spent on CPU-bound tasks. |
| 1471 | "writeMsMax": "A String", # Milliseconds the slowest shard spent on writing output. |
| 1472 | "waitMsAvg": "A String", # Milliseconds the average shard spent waiting to be scheduled. |
| 1473 | "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks. |
| 1474 | "writeMsAvg": "A String", # Milliseconds the average shard spent on writing output. |
| 1475 | "slotMs": "A String", # Slot-milliseconds used by the stage. |
| 1476 | "readMsAvg": "A String", # Milliseconds the average shard spent reading input. |
| 1477 | "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled. |
| 1478 | "shuffleOutputBytesSpilled": "A String", # Total number of bytes written to shuffle and spilled to disk. |
| 1479 | "startMs": "A String", # Stage start time represented as milliseconds since epoch. |
| 1480 | "completedParallelInputs": "A String", # Number of parallel input segments completed. |
| 1481 | "recordsRead": "A String", # Number of records read into the stage. |
| 1482 | "inputStages": [ # IDs for stages that are inputs to this stage. |
| 1483 | "A String", |
| 1484 | ], |
| 1485 | "computeMsMax": "A String", # Milliseconds the slowest shard spent on CPU-bound tasks. |
| 1486 | "id": "A String", # Unique ID for stage within plan. |
| 1487 | "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input. |
| 1488 | "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output. |
| 1489 | "readMsMax": "A String", # Milliseconds the slowest shard spent reading input. |
| 1490 | "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input. |
| 1491 | "status": "A String", # Current status for the stage. |
| 1492 | "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled. |
| 1493 | "name": "A String", # Human-readable name for stage. |
| 1494 | "endMs": "A String", # Stage end time represented as milliseconds since epoch. |
| 1495 | "parallelInputs": "A String", # Number of parallel input segments to be processed. |
| 1496 | "recordsWritten": "A String", # Number of records written by the stage. |
| 1497 | "steps": [ # List of operations within the stage in dependency order (approximately chronological). |
| 1498 | { |
| 1499 | "kind": "A String", # Machine-readable operation type. |
| 1500 | "substeps": [ # Human-readable stage descriptions. |
| 1501 | "A String", |
| 1502 | ], |
| 1503 | }, |
| 1504 | ], |
| 1505 | "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output. |
| 1506 | }, |
| 1507 | ], |
| 1508 | "totalBytesProcessedAccuracy": "A 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. |
| 1509 | "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache. |
| 1510 | "modelTrainingExpectedTotalIteration": "A String", # [Output-only, Beta] Deprecated; do not use. |
| 1511 | "ddlTargetRowAccessPolicy": { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
| 1512 | "policyId": "A String", # [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 1513 | "datasetId": "A String", # [Required] The ID of the dataset containing this row access policy. |
| 1514 | "tableId": "A String", # [Required] The ID of the table containing this row access policy. |
| 1515 | "projectId": "A String", # [Required] The ID of the project containing this row access policy. |
| 1516 | }, |
| 1517 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 1518 | { |
| 1519 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 1520 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
| 1521 | }, |
| 1522 | ], |
| 1523 | "ddlTargetRoutine": { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
| 1524 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 1525 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 1526 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 1527 | }, |
| 1528 | }, |
| 1529 | "quotaDeferments": [ # [Output-only] Quotas which delayed this job's start time. |
| 1530 | "A String", |
| 1531 | ], |
| 1532 | "scriptStatistics": { # [Output-only] Statistics for a child job of a script. |
| 1533 | "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. |
| 1534 | { |
| 1535 | "procedureId": "A String", # [Output-only] Name of the active procedure, empty if in a top-level script. |
| 1536 | "startColumn": 42, # [Output-only] One-based start column. |
| 1537 | "startLine": 42, # [Output-only] One-based start line. |
| 1538 | "endColumn": 42, # [Output-only] One-based end column. |
| 1539 | "endLine": 42, # [Output-only] One-based end line. |
| 1540 | "text": "A String", # [Output-only] Text of the current statement/expression. |
| 1541 | }, |
| 1542 | ], |
| 1543 | "evaluationKind": "A String", # [Output-only] Whether this child job was a statement or expression. |
| 1544 | }, |
| 1545 | "parentJobId": "A String", # [Output-only] If this is a child job, the id of the parent. |
| 1546 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 1547 | "load": { # [Output-only] Statistics for a load job. |
| 1548 | "outputRows": "A String", # [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. |
| 1549 | "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job. |
| 1550 | "badRecords": "A String", # [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. |
| 1551 | "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
| 1552 | "inputFiles": "A String", # [Output-only] Number of source files in a load job. |
| 1553 | }, |
| 1554 | }, |
| 1555 | "user_email": "A String", # [Output-only] Email address of the user who ran the job. |
| 1556 | "jobReference": { # [Optional] Reference describing the unique-per-user name of the job. |
| 1557 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 1558 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 1559 | "jobId": "A 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. |
| 1560 | }, |
| 1561 | "configuration": { # [Required] Describes the job configuration. |
| 1562 | "extract": { # [Pick one] Configures an extract job. |
| 1563 | "compression": "A 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. Not applicable when extracting models. |
| 1564 | "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
| 1565 | "A String", |
| 1566 | ], |
| 1567 | "useAvroLogicalTypes": True or False, # [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models. |
| 1568 | "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL. |
| 1569 | "sourceTable": { # A reference to the table being exported. |
| 1570 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1571 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1572 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1573 | }, |
| 1574 | "destinationUri": "A 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. |
| 1575 | "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models. |
| 1576 | "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
| 1577 | "sourceModel": { # A reference to the model being exported. |
| 1578 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 1579 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 1580 | "modelId": "A String", # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1581 | }, |
| 1582 | }, |
| 1583 | "dryRun": True or False, # [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. |
| 1584 | "load": { # [Pick one] Configures a load job. |
| 1585 | "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 1586 | "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. |
| 1587 | "fields": [ # Describes the fields in a table. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1588 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1589 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1590 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1591 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1592 | "A String", |
| 1593 | ], |
| 1594 | }, |
| 1595 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1596 | # Object with schema name: TableFieldSchema |
| 1597 | ], |
| 1598 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1599 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1600 | "policyTags": { |
| 1601 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1602 | "A String", |
| 1603 | ], |
| 1604 | }, |
| 1605 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1606 | }, |
| 1607 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1608 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1609 | "decimalTargetTypes": [ # [Trusted Tester] 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. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. 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. |
| 1610 | "A String", |
| 1611 | ], |
| 1612 | "skipLeadingRows": 42, # [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. |
| 1613 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1614 | "requirePartitionFilter": True or False, |
| 1615 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 1616 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 1617 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1618 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1619 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1620 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1621 | }, |
| 1622 | "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: 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. |
| 1623 | "A String", |
| 1624 | ], |
| 1625 | "destinationTable": { # [Required] The destination table to load the data into. |
| 1626 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1627 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1628 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1629 | }, |
| 1630 | "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
| 1631 | "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. |
| 1632 | "A String", |
| 1633 | ], |
| 1634 | "maxBadRecords": 42, # [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. |
| 1635 | "allowJaggedRows": True or False, # [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. |
| 1636 | "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property. |
| 1637 | "autodetect": True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
| 1638 | "encoding": "A 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. |
| 1639 | "destinationTableProperties": { # [Beta] [Optional] Properties with which to create the destination table if it is new. |
| 1640 | "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. |
| 1641 | "a_key": "A String", |
| 1642 | }, |
| 1643 | "description": "A 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. |
| 1644 | "friendlyName": "A String", # [Optional] The friendly name 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 friendly name is provided, the job will fail. |
| 1645 | }, |
| 1646 | "createDisposition": "A 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. |
| 1647 | "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. |
| 1648 | "A String", |
| 1649 | ], |
| 1650 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1651 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 1652 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1653 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1654 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1655 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1656 | }, |
| 1657 | }, |
| 1658 | "useAvroLogicalTypes": True or False, # [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). |
| 1659 | "ignoreUnknownValues": True or False, # [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 |
| 1660 | "sourceFormat": "A 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. |
| 1661 | "fieldDelimiter": "A 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 (','). |
| 1662 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1663 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 1664 | "A String", |
| 1665 | ], |
| 1666 | }, |
| 1667 | "nullMarker": "A 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. |
| 1668 | "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. |
| 1669 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1670 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1671 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1672 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1673 | }, |
| 1674 | "writeDisposition": "A 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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1675 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1676 | "jobType": "A String", # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
| 1677 | "query": { # [Pick one] Configures a query job. |
| 1678 | "query": "A String", # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
| 1679 | "flattenResults": true, # [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. |
| 1680 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1681 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 1682 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1683 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1684 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1685 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1686 | }, |
| 1687 | }, |
| 1688 | "maximumBillingTier": 1, # [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. |
| 1689 | "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
| 1690 | "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size. |
| 1691 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1692 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1693 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1694 | }, |
| 1695 | "tableDefinitions": { # [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. |
| 1696 | "a_key": { |
| 1697 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1698 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1699 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1700 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1701 | }, |
| 1702 | "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. |
| 1703 | "fields": [ # Describes the fields in a table. |
| 1704 | { |
| 1705 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1706 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1707 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1708 | "A String", |
| 1709 | ], |
| 1710 | }, |
| 1711 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1712 | # Object with schema name: TableFieldSchema |
| 1713 | ], |
| 1714 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1715 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1716 | "policyTags": { |
| 1717 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1718 | "A String", |
| 1719 | ], |
| 1720 | }, |
| 1721 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1722 | }, |
| 1723 | ], |
| 1724 | }, |
| 1725 | "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1726 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1727 | "readRowkeyAsString": True or False, # [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false. |
| 1728 | "ignoreUnspecifiedColumnFamilies": True or False, # [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. |
| 1729 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1730 | { |
| 1731 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1732 | "onlyReadLatest": True or False, # [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. |
| 1733 | "familyId": "A String", # Identifier of the column family. |
| 1734 | "columns": [ # [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. |
| 1735 | { |
| 1736 | "fieldName": "A String", # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. |
| 1737 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1738 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1739 | "qualifierString": "A String", |
| 1740 | "qualifierEncoded": "A String", # [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 1741 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1742 | }, |
| 1743 | ], |
| 1744 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1745 | }, |
| 1746 | ], |
| 1747 | }, |
| 1748 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1749 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1750 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1751 | "ignoreUnknownValues": True or False, # [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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. |
| 1752 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1753 | "encoding": "A 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. |
| 1754 | "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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. |
| 1755 | "fieldDelimiter": "A String", # [Optional] The separator for fields 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). |
| 1756 | "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. |
| 1757 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1758 | "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 1759 | }, |
| 1760 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1761 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1762 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1763 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1764 | }, |
| 1765 | "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. |
| 1766 | "A String", |
| 1767 | ], |
| 1768 | }, |
| 1769 | }, |
| 1770 | "queryParameters": [ # Query parameters for standard SQL queries. |
| 1771 | { |
| 1772 | "parameterValue": { # [Required] The value of this parameter. |
| 1773 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 1774 | # Object with schema name: QueryParameterValue |
| 1775 | ], |
| 1776 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 1777 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 1778 | "a_key": # Object with schema name: QueryParameterValue |
| 1779 | }, |
| 1780 | }, |
| 1781 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 1782 | "parameterType": { # [Required] The type of this parameter. |
| 1783 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 1784 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 1785 | { |
| 1786 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 1787 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 1788 | "name": "A String", # [Optional] The name of this field. |
| 1789 | }, |
| 1790 | ], |
| 1791 | "type": "A String", # [Required] The top level type of this field. |
| 1792 | }, |
| 1793 | }, |
| 1794 | ], |
| 1795 | "allowLargeResults": false, # [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. |
| 1796 | "maximumBytesBilled": "A String", # [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. |
| 1797 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1798 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1799 | }, |
| 1800 | "useLegacySql": true, # 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. |
| 1801 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 1802 | "connectionProperties": [ # Connection properties. |
| 1803 | { |
| 1804 | "key": "A String", # [Required] Name of the connection property to set. |
| 1805 | "value": "A String", # [Required] Value of the connection property. |
| 1806 | }, |
| 1807 | ], |
| 1808 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1809 | "requirePartitionFilter": True or False, |
| 1810 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 1811 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 1812 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 1813 | }, |
| 1814 | "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: 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. |
| 1815 | "A String", |
| 1816 | ], |
| 1817 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
| 1818 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 1819 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 1820 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 1821 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 1822 | }, |
| 1823 | ], |
| 1824 | "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. |
| 1825 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1826 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
| 1827 | }, |
| 1828 | "useQueryCache": true, # [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. |
| 1829 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1830 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 1831 | "A String", |
| 1832 | ], |
| 1833 | }, |
| 1834 | "createDisposition": "A 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. |
| 1835 | "writeDisposition": "A 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. |
| 1836 | }, |
| 1837 | "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. |
| 1838 | "a_key": "A String", |
| 1839 | }, |
| 1840 | "jobTimeoutMs": "A String", # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job. |
| 1841 | "copy": { # [Pick one] Copies a table. |
| 1842 | "sourceTable": { # [Pick one] Source table to copy. |
| 1843 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1844 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1845 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1846 | }, |
| 1847 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1848 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1849 | }, |
| 1850 | "destinationTable": { # [Required] The destination table |
| 1851 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1852 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1853 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1854 | }, |
| 1855 | "operationType": "A String", # [Optional] Supported operation types in table copy job. |
| 1856 | "writeDisposition": "A 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. |
| 1857 | "destinationExpirationTime": "", # [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed. |
| 1858 | "sourceTables": [ # [Pick one] Source tables to copy. |
| 1859 | { |
| 1860 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1861 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1862 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1863 | }, |
| 1864 | ], |
| 1865 | "createDisposition": "A 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. |
| 1866 | }, |
| 1867 | }, |
| 1868 | } |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1869 | |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1870 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 1871 | media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1872 | |
| 1873 | Returns: |
| 1874 | An object of the form: |
| 1875 | |
| 1876 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1877 | "id": "A String", # [Output-only] Opaque ID field of the job |
| 1878 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 1879 | "kind": "bigquery#job", # [Output-only] The type of the resource. |
| 1880 | "etag": "A String", # [Output-only] A hash of this resource. |
| 1881 | "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. |
| 1882 | "state": "A String", # [Output-only] Running state of the job. |
| 1883 | "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 completed or was unsuccessful. |
| 1884 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1885 | "reason": "A String", # A short error code that summarizes the error. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 1886 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1887 | "location": "A String", # Specifies where the error occurred, if present. |
| 1888 | "message": "A String", # A human-readable description of the error. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1889 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1890 | ], |
| 1891 | "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
| 1892 | "reason": "A String", # A short error code that summarizes the error. |
| 1893 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 1894 | "location": "A String", # Specifies where the error occurred, if present. |
| 1895 | "message": "A String", # A human-readable description of the error. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1896 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1897 | }, |
| 1898 | "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job. |
| 1899 | "startTime": "A String", # [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. |
| 1900 | "completionRatio": 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
| 1901 | "rowLevelSecurityStatistics": { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs. |
| 1902 | "rowLevelSecurityApplied": True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1903 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1904 | "numChildJobs": "A String", # [Output-only] Number of child jobs executed. |
| 1905 | "extract": { # [Output-only] Statistics for an extract job. |
| 1906 | "inputBytes": "A String", # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes. |
| 1907 | "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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1908 | "A String", |
| 1909 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1910 | }, |
| 1911 | "transactionInfoTemplate": { # [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one. |
| 1912 | "transactionId": "A String", # [Output-only] // [Alpha] Id of the transaction. |
| 1913 | }, |
| 1914 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 1915 | { |
| 1916 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 1917 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1918 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1919 | ], |
| 1920 | "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
| 1921 | "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. |
| 1922 | "reservation_id": "A 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. |
| 1923 | "endTime": "A String", # [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. |
| 1924 | "query": { # [Output-only] Statistics for a query job. |
| 1925 | "undeclaredQueryParameters": [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1926 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1927 | "parameterValue": { # [Required] The value of this parameter. |
| 1928 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 1929 | # Object with schema name: QueryParameterValue |
| 1930 | ], |
| 1931 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 1932 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 1933 | "a_key": # Object with schema name: QueryParameterValue |
| 1934 | }, |
| 1935 | }, |
| 1936 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 1937 | "parameterType": { # [Required] The type of this parameter. |
| 1938 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 1939 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 1940 | { |
| 1941 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 1942 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 1943 | "name": "A String", # [Optional] The name of this field. |
| 1944 | }, |
| 1945 | ], |
| 1946 | "type": "A String", # [Required] The top level type of this field. |
| 1947 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1948 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1949 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1950 | "ddlOperationPerformed": "A 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. |
| 1951 | "schema": { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
| 1952 | "fields": [ # Describes the fields in a table. |
| 1953 | { |
| 1954 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 1955 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1956 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1957 | "A String", |
| 1958 | ], |
| 1959 | }, |
| 1960 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1961 | # Object with schema name: TableFieldSchema |
| 1962 | ], |
| 1963 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1964 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1965 | "policyTags": { |
| 1966 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1967 | "A String", |
| 1968 | ], |
| 1969 | }, |
| 1970 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1971 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 1972 | ], |
| 1973 | }, |
| 1974 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 1975 | "modelTrainingCurrentIteration": 42, # [Output-only, Beta] Deprecated; do not use. |
| 1976 | "billingTier": 42, # [Output-only] Billing tier for the job. |
| 1977 | "estimatedBytesProcessed": "A String", # [Output-only] The original estimate of bytes processed for the job. |
| 1978 | "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job. |
| 1979 | "statementType": "A 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. "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. |
| 1980 | "ddlAffectedRowAccessPolicyCount": "A String", # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
| 1981 | "referencedTables": [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
| 1982 | { |
| 1983 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1984 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1985 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1986 | }, |
| 1987 | ], |
| 1988 | "totalPartitionsProcessed": "A String", # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job. |
| 1989 | "ddlTargetTable": { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
| 1990 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 1991 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1992 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1993 | }, |
| 1994 | "referencedRoutines": [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job. |
| 1995 | { |
| 1996 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 1997 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 1998 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 1999 | }, |
| 2000 | ], |
| 2001 | "timeline": [ # [Output-only] [Beta] Describes a timeline of job execution. |
| 2002 | { |
| 2003 | "activeUnits": "A String", # Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
| 2004 | "completedUnits": "A String", # Total parallel units of work completed by this query. |
| 2005 | "pendingUnits": "A String", # Total parallel units of work remaining for the active stages. |
| 2006 | "totalSlotMs": "A String", # Cumulative slot-ms consumed by the query. |
| 2007 | "elapsedMs": "A String", # Milliseconds elapsed since the start of query execution. |
| 2008 | }, |
| 2009 | ], |
| 2010 | "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job. |
| 2011 | "modelTraining": { # [Output-only, Beta] Information about create model query job progress. |
| 2012 | "expectedTotalIterations": "A String", # [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop. |
| 2013 | "currentIteration": 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress. |
| 2014 | }, |
| 2015 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 2016 | "queryPlan": [ # [Output-only] Describes execution plan for the query. |
| 2017 | { |
| 2018 | "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks. |
| 2019 | "waitMsMax": "A String", # Milliseconds the slowest shard spent waiting to be scheduled. |
| 2020 | "shuffleOutputBytes": "A String", # Total number of bytes written to shuffle. |
| 2021 | "computeMsAvg": "A String", # Milliseconds the average shard spent on CPU-bound tasks. |
| 2022 | "writeMsMax": "A String", # Milliseconds the slowest shard spent on writing output. |
| 2023 | "waitMsAvg": "A String", # Milliseconds the average shard spent waiting to be scheduled. |
| 2024 | "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks. |
| 2025 | "writeMsAvg": "A String", # Milliseconds the average shard spent on writing output. |
| 2026 | "slotMs": "A String", # Slot-milliseconds used by the stage. |
| 2027 | "readMsAvg": "A String", # Milliseconds the average shard spent reading input. |
| 2028 | "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled. |
| 2029 | "shuffleOutputBytesSpilled": "A String", # Total number of bytes written to shuffle and spilled to disk. |
| 2030 | "startMs": "A String", # Stage start time represented as milliseconds since epoch. |
| 2031 | "completedParallelInputs": "A String", # Number of parallel input segments completed. |
| 2032 | "recordsRead": "A String", # Number of records read into the stage. |
| 2033 | "inputStages": [ # IDs for stages that are inputs to this stage. |
| 2034 | "A String", |
| 2035 | ], |
| 2036 | "computeMsMax": "A String", # Milliseconds the slowest shard spent on CPU-bound tasks. |
| 2037 | "id": "A String", # Unique ID for stage within plan. |
| 2038 | "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input. |
| 2039 | "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output. |
| 2040 | "readMsMax": "A String", # Milliseconds the slowest shard spent reading input. |
| 2041 | "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input. |
| 2042 | "status": "A String", # Current status for the stage. |
| 2043 | "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled. |
| 2044 | "name": "A String", # Human-readable name for stage. |
| 2045 | "endMs": "A String", # Stage end time represented as milliseconds since epoch. |
| 2046 | "parallelInputs": "A String", # Number of parallel input segments to be processed. |
| 2047 | "recordsWritten": "A String", # Number of records written by the stage. |
| 2048 | "steps": [ # List of operations within the stage in dependency order (approximately chronological). |
| 2049 | { |
| 2050 | "kind": "A String", # Machine-readable operation type. |
| 2051 | "substeps": [ # Human-readable stage descriptions. |
| 2052 | "A String", |
| 2053 | ], |
| 2054 | }, |
| 2055 | ], |
| 2056 | "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output. |
| 2057 | }, |
| 2058 | ], |
| 2059 | "totalBytesProcessedAccuracy": "A 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. |
| 2060 | "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache. |
| 2061 | "modelTrainingExpectedTotalIteration": "A String", # [Output-only, Beta] Deprecated; do not use. |
| 2062 | "ddlTargetRowAccessPolicy": { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
| 2063 | "policyId": "A String", # [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 2064 | "datasetId": "A String", # [Required] The ID of the dataset containing this row access policy. |
| 2065 | "tableId": "A String", # [Required] The ID of the table containing this row access policy. |
| 2066 | "projectId": "A String", # [Required] The ID of the project containing this row access policy. |
| 2067 | }, |
| 2068 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 2069 | { |
| 2070 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 2071 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
| 2072 | }, |
| 2073 | ], |
| 2074 | "ddlTargetRoutine": { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
| 2075 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 2076 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 2077 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
| 2078 | }, |
| 2079 | }, |
| 2080 | "quotaDeferments": [ # [Output-only] Quotas which delayed this job's start time. |
| 2081 | "A String", |
| 2082 | ], |
| 2083 | "scriptStatistics": { # [Output-only] Statistics for a child job of a script. |
| 2084 | "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. |
| 2085 | { |
| 2086 | "procedureId": "A String", # [Output-only] Name of the active procedure, empty if in a top-level script. |
| 2087 | "startColumn": 42, # [Output-only] One-based start column. |
| 2088 | "startLine": 42, # [Output-only] One-based start line. |
| 2089 | "endColumn": 42, # [Output-only] One-based end column. |
| 2090 | "endLine": 42, # [Output-only] One-based end line. |
| 2091 | "text": "A String", # [Output-only] Text of the current statement/expression. |
| 2092 | }, |
| 2093 | ], |
| 2094 | "evaluationKind": "A String", # [Output-only] Whether this child job was a statement or expression. |
| 2095 | }, |
| 2096 | "parentJobId": "A String", # [Output-only] If this is a child job, the id of the parent. |
| 2097 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 2098 | "load": { # [Output-only] Statistics for a load job. |
| 2099 | "outputRows": "A String", # [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. |
| 2100 | "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job. |
| 2101 | "badRecords": "A String", # [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. |
| 2102 | "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
| 2103 | "inputFiles": "A String", # [Output-only] Number of source files in a load job. |
| 2104 | }, |
| 2105 | }, |
| 2106 | "user_email": "A String", # [Output-only] Email address of the user who ran the job. |
| 2107 | "jobReference": { # [Optional] Reference describing the unique-per-user name of the job. |
| 2108 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 2109 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 2110 | "jobId": "A 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. |
| 2111 | }, |
| 2112 | "configuration": { # [Required] Describes the job configuration. |
| 2113 | "extract": { # [Pick one] Configures an extract job. |
| 2114 | "compression": "A 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. Not applicable when extracting models. |
| 2115 | "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
| 2116 | "A String", |
| 2117 | ], |
| 2118 | "useAvroLogicalTypes": True or False, # [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models. |
| 2119 | "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL. |
| 2120 | "sourceTable": { # A reference to the table being exported. |
| 2121 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2122 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2123 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2124 | }, |
| 2125 | "destinationUri": "A 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. |
| 2126 | "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models. |
| 2127 | "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
| 2128 | "sourceModel": { # A reference to the model being exported. |
| 2129 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 2130 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 2131 | "modelId": "A String", # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2132 | }, |
| 2133 | }, |
| 2134 | "dryRun": True or False, # [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. |
| 2135 | "load": { # [Pick one] Configures a load job. |
| 2136 | "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 2137 | "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. |
| 2138 | "fields": [ # Describes the fields in a table. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2139 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2140 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 2141 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 2142 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 2143 | "A String", |
| 2144 | ], |
| 2145 | }, |
| 2146 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 2147 | # Object with schema name: TableFieldSchema |
| 2148 | ], |
| 2149 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 2150 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 2151 | "policyTags": { |
| 2152 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 2153 | "A String", |
| 2154 | ], |
| 2155 | }, |
| 2156 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2157 | }, |
| 2158 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2159 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2160 | "decimalTargetTypes": [ # [Trusted Tester] 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. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. 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. |
| 2161 | "A String", |
| 2162 | ], |
| 2163 | "skipLeadingRows": 42, # [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. |
| 2164 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2165 | "requirePartitionFilter": True or False, |
| 2166 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 2167 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 2168 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2169 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2170 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2171 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2172 | }, |
| 2173 | "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: 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. |
| 2174 | "A String", |
| 2175 | ], |
| 2176 | "destinationTable": { # [Required] The destination table to load the data into. |
| 2177 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2178 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2179 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2180 | }, |
| 2181 | "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
| 2182 | "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. |
| 2183 | "A String", |
| 2184 | ], |
| 2185 | "maxBadRecords": 42, # [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. |
| 2186 | "allowJaggedRows": True or False, # [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. |
| 2187 | "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property. |
| 2188 | "autodetect": True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
| 2189 | "encoding": "A 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. |
| 2190 | "destinationTableProperties": { # [Beta] [Optional] Properties with which to create the destination table if it is new. |
| 2191 | "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. |
| 2192 | "a_key": "A String", |
| 2193 | }, |
| 2194 | "description": "A 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. |
| 2195 | "friendlyName": "A String", # [Optional] The friendly name 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 friendly name is provided, the job will fail. |
| 2196 | }, |
| 2197 | "createDisposition": "A 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. |
| 2198 | "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. |
| 2199 | "A String", |
| 2200 | ], |
| 2201 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2202 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 2203 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 2204 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 2205 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 2206 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 2207 | }, |
| 2208 | }, |
| 2209 | "useAvroLogicalTypes": True or False, # [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). |
| 2210 | "ignoreUnknownValues": True or False, # [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 |
| 2211 | "sourceFormat": "A 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. |
| 2212 | "fieldDelimiter": "A 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 (','). |
| 2213 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 2214 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 2215 | "A String", |
| 2216 | ], |
| 2217 | }, |
| 2218 | "nullMarker": "A 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. |
| 2219 | "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. |
| 2220 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 2221 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 2222 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 2223 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 2224 | }, |
| 2225 | "writeDisposition": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2226 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2227 | "jobType": "A String", # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
| 2228 | "query": { # [Pick one] Configures a query job. |
| 2229 | "query": "A String", # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
| 2230 | "flattenResults": true, # [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. |
| 2231 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2232 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 2233 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 2234 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 2235 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 2236 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 2237 | }, |
| 2238 | }, |
| 2239 | "maximumBillingTier": 1, # [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. |
| 2240 | "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
| 2241 | "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size. |
| 2242 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2243 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2244 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2245 | }, |
| 2246 | "tableDefinitions": { # [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. |
| 2247 | "a_key": { |
| 2248 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 2249 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 2250 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 2251 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 2252 | }, |
| 2253 | "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. |
| 2254 | "fields": [ # Describes the fields in a table. |
| 2255 | { |
| 2256 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 2257 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 2258 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 2259 | "A String", |
| 2260 | ], |
| 2261 | }, |
| 2262 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 2263 | # Object with schema name: TableFieldSchema |
| 2264 | ], |
| 2265 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 2266 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 2267 | "policyTags": { |
| 2268 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 2269 | "A String", |
| 2270 | ], |
| 2271 | }, |
| 2272 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 2273 | }, |
| 2274 | ], |
| 2275 | }, |
| 2276 | "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 2277 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 2278 | "readRowkeyAsString": True or False, # [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false. |
| 2279 | "ignoreUnspecifiedColumnFamilies": True or False, # [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. |
| 2280 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 2281 | { |
| 2282 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 2283 | "onlyReadLatest": True or False, # [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. |
| 2284 | "familyId": "A String", # Identifier of the column family. |
| 2285 | "columns": [ # [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. |
| 2286 | { |
| 2287 | "fieldName": "A String", # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. |
| 2288 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 2289 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 2290 | "qualifierString": "A String", |
| 2291 | "qualifierEncoded": "A String", # [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 2292 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 2293 | }, |
| 2294 | ], |
| 2295 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 2296 | }, |
| 2297 | ], |
| 2298 | }, |
| 2299 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 2300 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 2301 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 2302 | "ignoreUnknownValues": True or False, # [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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. |
| 2303 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 2304 | "encoding": "A 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. |
| 2305 | "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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. |
| 2306 | "fieldDelimiter": "A String", # [Optional] The separator for fields 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). |
| 2307 | "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. |
| 2308 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 2309 | "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 2310 | }, |
| 2311 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 2312 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 2313 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 2314 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 2315 | }, |
| 2316 | "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. |
| 2317 | "A String", |
| 2318 | ], |
| 2319 | }, |
| 2320 | }, |
| 2321 | "queryParameters": [ # Query parameters for standard SQL queries. |
| 2322 | { |
| 2323 | "parameterValue": { # [Required] The value of this parameter. |
| 2324 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 2325 | # Object with schema name: QueryParameterValue |
| 2326 | ], |
| 2327 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 2328 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 2329 | "a_key": # Object with schema name: QueryParameterValue |
| 2330 | }, |
| 2331 | }, |
| 2332 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 2333 | "parameterType": { # [Required] The type of this parameter. |
| 2334 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 2335 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 2336 | { |
| 2337 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 2338 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 2339 | "name": "A String", # [Optional] The name of this field. |
| 2340 | }, |
| 2341 | ], |
| 2342 | "type": "A String", # [Required] The top level type of this field. |
| 2343 | }, |
| 2344 | }, |
| 2345 | ], |
| 2346 | "allowLargeResults": false, # [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. |
| 2347 | "maximumBytesBilled": "A String", # [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. |
| 2348 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2349 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2350 | }, |
| 2351 | "useLegacySql": true, # 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. |
| 2352 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 2353 | "connectionProperties": [ # Connection properties. |
| 2354 | { |
| 2355 | "key": "A String", # [Required] Name of the connection property to set. |
| 2356 | "value": "A String", # [Required] Value of the connection property. |
| 2357 | }, |
| 2358 | ], |
| 2359 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2360 | "requirePartitionFilter": True or False, |
| 2361 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 2362 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 2363 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 2364 | }, |
| 2365 | "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: 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. |
| 2366 | "A String", |
| 2367 | ], |
| 2368 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
| 2369 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 2370 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 2371 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 2372 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 2373 | }, |
| 2374 | ], |
| 2375 | "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. |
| 2376 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2377 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
| 2378 | }, |
| 2379 | "useQueryCache": true, # [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. |
| 2380 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 2381 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 2382 | "A String", |
| 2383 | ], |
| 2384 | }, |
| 2385 | "createDisposition": "A 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. |
| 2386 | "writeDisposition": "A 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. |
| 2387 | }, |
| 2388 | "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. |
| 2389 | "a_key": "A String", |
| 2390 | }, |
| 2391 | "jobTimeoutMs": "A String", # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job. |
| 2392 | "copy": { # [Pick one] Copies a table. |
| 2393 | "sourceTable": { # [Pick one] Source table to copy. |
| 2394 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2395 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2396 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2397 | }, |
| 2398 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2399 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2400 | }, |
| 2401 | "destinationTable": { # [Required] The destination table |
| 2402 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2403 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2404 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2405 | }, |
| 2406 | "operationType": "A String", # [Optional] Supported operation types in table copy job. |
| 2407 | "writeDisposition": "A 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. |
| 2408 | "destinationExpirationTime": "", # [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed. |
| 2409 | "sourceTables": [ # [Pick one] Source tables to copy. |
| 2410 | { |
| 2411 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2412 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2413 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2414 | }, |
| 2415 | ], |
| 2416 | "createDisposition": "A 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. |
| 2417 | }, |
| 2418 | }, |
| 2419 | }</pre> |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2420 | </div> |
| 2421 | |
| 2422 | <div class="method"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2423 | <code class="details" id="list">list(projectId, minCreationTime=None, pageToken=None, maxCreationTime=None, parentJobId=None, allUsers=None, projection=None, stateFilter=None, maxResults=None)</code> |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2424 | <pre>Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. |
| 2425 | |
| 2426 | Args: |
| 2427 | projectId: string, Project ID of the jobs to list (required) |
| 2428 | minCreationTime: string, Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2429 | pageToken: string, Page token, returned by a previous call, to request the next page of results |
| 2430 | maxCreationTime: string, Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2431 | parentJobId: string, If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2432 | allUsers: boolean, Whether to display jobs owned by all users in the project. Default false |
| 2433 | projection: string, Restrict information returned to a set of selected fields |
| 2434 | Allowed values |
| 2435 | full - Includes all job data |
| 2436 | minimal - Does not include the job configuration |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2437 | stateFilter: string, Filter for job state (repeated) |
| 2438 | Allowed values |
| 2439 | done - Finished jobs |
| 2440 | pending - Pending jobs |
| 2441 | running - Running jobs |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2442 | maxResults: integer, Maximum number of results to return |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2443 | |
| 2444 | Returns: |
| 2445 | An object of the form: |
| 2446 | |
| 2447 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2448 | "jobs": [ # List of jobs that were requested. |
| 2449 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2450 | "kind": "bigquery#job", # The resource type. |
| 2451 | "jobReference": { # Job reference uniquely identifying the job. |
| 2452 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 2453 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 2454 | "jobId": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2455 | }, |
| 2456 | "errorResult": { # A result object that will be present only if the job has failed. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2457 | "reason": "A String", # A short error code that summarizes the error. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2458 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2459 | "location": "A String", # Specifies where the error occurred, if present. |
| 2460 | "message": "A String", # A human-readable description of the error. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2461 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2462 | "status": { # [Full-projection-only] Describes the state of the job. |
| 2463 | "state": "A String", # [Output-only] Running state of the job. |
| 2464 | "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 completed or was unsuccessful. |
| 2465 | { |
| 2466 | "reason": "A String", # A short error code that summarizes the error. |
| 2467 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 2468 | "location": "A String", # Specifies where the error occurred, if present. |
| 2469 | "message": "A String", # A human-readable description of the error. |
| 2470 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2471 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2472 | "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. |
| 2473 | "reason": "A String", # A short error code that summarizes the error. |
| 2474 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 2475 | "location": "A String", # Specifies where the error occurred, if present. |
| 2476 | "message": "A String", # A human-readable description of the error. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2477 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2478 | }, |
| 2479 | "state": "A String", # Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed. |
| 2480 | "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job. |
| 2481 | "startTime": "A String", # [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. |
| 2482 | "completionRatio": 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs. |
| 2483 | "rowLevelSecurityStatistics": { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs. |
| 2484 | "rowLevelSecurityApplied": True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies. |
| 2485 | }, |
| 2486 | "numChildJobs": "A String", # [Output-only] Number of child jobs executed. |
| 2487 | "extract": { # [Output-only] Statistics for an extract job. |
| 2488 | "inputBytes": "A String", # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes. |
| 2489 | "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. |
| 2490 | "A String", |
| 2491 | ], |
| 2492 | }, |
| 2493 | "transactionInfoTemplate": { # [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one. |
| 2494 | "transactionId": "A String", # [Output-only] // [Alpha] Id of the transaction. |
| 2495 | }, |
| 2496 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 2497 | { |
| 2498 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
| 2499 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
| 2500 | }, |
| 2501 | ], |
| 2502 | "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. |
| 2503 | "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2504 | "reservation_id": "A 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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2505 | "endTime": "A String", # [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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2506 | "query": { # [Output-only] Statistics for a query job. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2507 | "undeclaredQueryParameters": [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2508 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2509 | "parameterValue": { # [Required] The value of this parameter. |
| 2510 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 2511 | # Object with schema name: QueryParameterValue |
| 2512 | ], |
| 2513 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 2514 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 2515 | "a_key": # Object with schema name: QueryParameterValue |
| 2516 | }, |
| 2517 | }, |
| 2518 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 2519 | "parameterType": { # [Required] The type of this parameter. |
| 2520 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 2521 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 2522 | { |
| 2523 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 2524 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 2525 | "name": "A String", # [Optional] The name of this field. |
| 2526 | }, |
| 2527 | ], |
| 2528 | "type": "A String", # [Required] The top level type of this field. |
| 2529 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2530 | }, |
| 2531 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2532 | "ddlOperationPerformed": "A 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. |
| 2533 | "schema": { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. |
| 2534 | "fields": [ # Describes the fields in a table. |
| 2535 | { |
| 2536 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 2537 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 2538 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 2539 | "A String", |
| 2540 | ], |
| 2541 | }, |
| 2542 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 2543 | # Object with schema name: TableFieldSchema |
| 2544 | ], |
| 2545 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 2546 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 2547 | "policyTags": { |
| 2548 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 2549 | "A String", |
| 2550 | ], |
| 2551 | }, |
| 2552 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 2553 | }, |
| 2554 | ], |
| 2555 | }, |
| 2556 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 2557 | "modelTrainingCurrentIteration": 42, # [Output-only, Beta] Deprecated; do not use. |
| 2558 | "billingTier": 42, # [Output-only] Billing tier for the job. |
| 2559 | "estimatedBytesProcessed": "A String", # [Output-only] The original estimate of bytes processed for the job. |
| 2560 | "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job. |
| 2561 | "statementType": "A 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. "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. |
| 2562 | "ddlAffectedRowAccessPolicyCount": "A String", # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2563 | "referencedTables": [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. |
| 2564 | { |
| 2565 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2566 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2567 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2568 | }, |
| 2569 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2570 | "totalPartitionsProcessed": "A String", # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job. |
| 2571 | "ddlTargetTable": { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. |
| 2572 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2573 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2574 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2575 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2576 | "referencedRoutines": [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job. |
| 2577 | { |
| 2578 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2579 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2580 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2581 | }, |
| 2582 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2583 | "timeline": [ # [Output-only] [Beta] Describes a timeline of job execution. |
| 2584 | { |
| 2585 | "activeUnits": "A String", # Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample. |
| 2586 | "completedUnits": "A String", # Total parallel units of work completed by this query. |
| 2587 | "pendingUnits": "A String", # Total parallel units of work remaining for the active stages. |
| 2588 | "totalSlotMs": "A String", # Cumulative slot-ms consumed by the query. |
| 2589 | "elapsedMs": "A String", # Milliseconds elapsed since the start of query execution. |
| 2590 | }, |
| 2591 | ], |
| 2592 | "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2593 | "modelTraining": { # [Output-only, Beta] Information about create model query job progress. |
| 2594 | "expectedTotalIterations": "A String", # [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop. |
| 2595 | "currentIteration": 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress. |
| 2596 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2597 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2598 | "queryPlan": [ # [Output-only] Describes execution plan for the query. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2599 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2600 | "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2601 | "waitMsMax": "A String", # Milliseconds the slowest shard spent waiting to be scheduled. |
| 2602 | "shuffleOutputBytes": "A String", # Total number of bytes written to shuffle. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2603 | "computeMsAvg": "A String", # Milliseconds the average shard spent on CPU-bound tasks. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2604 | "writeMsMax": "A String", # Milliseconds the slowest shard spent on writing output. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2605 | "waitMsAvg": "A String", # Milliseconds the average shard spent waiting to be scheduled. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2606 | "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2607 | "writeMsAvg": "A String", # Milliseconds the average shard spent on writing output. |
| 2608 | "slotMs": "A String", # Slot-milliseconds used by the stage. |
| 2609 | "readMsAvg": "A String", # Milliseconds the average shard spent reading input. |
| 2610 | "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled. |
| 2611 | "shuffleOutputBytesSpilled": "A String", # Total number of bytes written to shuffle and spilled to disk. |
| 2612 | "startMs": "A String", # Stage start time represented as milliseconds since epoch. |
| 2613 | "completedParallelInputs": "A String", # Number of parallel input segments completed. |
| 2614 | "recordsRead": "A String", # Number of records read into the stage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2615 | "inputStages": [ # IDs for stages that are inputs to this stage. |
| 2616 | "A String", |
| 2617 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2618 | "computeMsMax": "A String", # Milliseconds the slowest shard spent on CPU-bound tasks. |
| 2619 | "id": "A String", # Unique ID for stage within plan. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2620 | "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2621 | "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2622 | "readMsMax": "A String", # Milliseconds the slowest shard spent reading input. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2623 | "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input. |
| 2624 | "status": "A String", # Current status for the stage. |
| 2625 | "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled. |
| 2626 | "name": "A String", # Human-readable name for stage. |
| 2627 | "endMs": "A String", # Stage end time represented as milliseconds since epoch. |
| 2628 | "parallelInputs": "A String", # Number of parallel input segments to be processed. |
| 2629 | "recordsWritten": "A String", # Number of records written by the stage. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2630 | "steps": [ # List of operations within the stage in dependency order (approximately chronological). |
| 2631 | { |
| 2632 | "kind": "A String", # Machine-readable operation type. |
| 2633 | "substeps": [ # Human-readable stage descriptions. |
| 2634 | "A String", |
| 2635 | ], |
| 2636 | }, |
| 2637 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2638 | "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2639 | }, |
| 2640 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2641 | "totalBytesProcessedAccuracy": "A 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. |
| 2642 | "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2643 | "modelTrainingExpectedTotalIteration": "A String", # [Output-only, Beta] Deprecated; do not use. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2644 | "ddlTargetRowAccessPolicy": { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries. |
| 2645 | "policyId": "A String", # [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 2646 | "datasetId": "A String", # [Required] The ID of the dataset containing this row access policy. |
| 2647 | "tableId": "A String", # [Required] The ID of the table containing this row access policy. |
| 2648 | "projectId": "A String", # [Required] The ID of the project containing this row access policy. |
| 2649 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2650 | "reservationUsage": [ # [Output-only] Job resource usage breakdown by reservation. |
| 2651 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2652 | "slotMs": "A String", # [Output-only] Slot-milliseconds the job spent in the given reservation. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2653 | "name": "A String", # [Output-only] Reservation name or "unreserved" for on-demand resources usage. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2654 | }, |
| 2655 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2656 | "ddlTargetRoutine": { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries. |
| 2657 | "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. |
| 2658 | "datasetId": "A String", # [Required] The ID of the dataset containing this routine. |
| 2659 | "projectId": "A String", # [Required] The ID of the project containing this routine. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2660 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2661 | }, |
| 2662 | "quotaDeferments": [ # [Output-only] Quotas which delayed this job's start time. |
| 2663 | "A String", |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2664 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2665 | "scriptStatistics": { # [Output-only] Statistics for a child job of a script. |
| 2666 | "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. |
| 2667 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2668 | "procedureId": "A String", # [Output-only] Name of the active procedure, empty if in a top-level script. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2669 | "startColumn": 42, # [Output-only] One-based start column. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2670 | "startLine": 42, # [Output-only] One-based start line. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2671 | "endColumn": 42, # [Output-only] One-based end column. |
| 2672 | "endLine": 42, # [Output-only] One-based end line. |
| 2673 | "text": "A String", # [Output-only] Text of the current statement/expression. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2674 | }, |
| 2675 | ], |
| 2676 | "evaluationKind": "A String", # [Output-only] Whether this child job was a statement or expression. |
| 2677 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2678 | "parentJobId": "A String", # [Output-only] If this is a child job, the id of the parent. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2679 | "totalSlotMs": "A String", # [Output-only] Slot-milliseconds for the job. |
| 2680 | "load": { # [Output-only] Statistics for a load job. |
| 2681 | "outputRows": "A String", # [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. |
| 2682 | "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job. |
| 2683 | "badRecords": "A String", # [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. |
| 2684 | "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. |
| 2685 | "inputFiles": "A String", # [Output-only] Number of source files in a load job. |
| 2686 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2687 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2688 | "id": "A String", # Unique opaque ID of the job. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2689 | "configuration": { # [Full-projection-only] Specifies the job configuration. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2690 | "extract": { # [Pick one] Configures an extract job. |
| 2691 | "compression": "A 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. Not applicable when extracting models. |
| 2692 | "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. |
| 2693 | "A String", |
| 2694 | ], |
| 2695 | "useAvroLogicalTypes": True or False, # [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models. |
| 2696 | "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL. |
| 2697 | "sourceTable": { # A reference to the table being exported. |
| 2698 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2699 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2700 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2701 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2702 | "destinationUri": "A 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. |
| 2703 | "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models. |
| 2704 | "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. |
| 2705 | "sourceModel": { # A reference to the model being exported. |
| 2706 | "datasetId": "A String", # [Required] The ID of the dataset containing this model. |
| 2707 | "projectId": "A String", # [Required] The ID of the project containing this model. |
| 2708 | "modelId": "A String", # [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2709 | }, |
| 2710 | }, |
| 2711 | "dryRun": True or False, # [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. |
| 2712 | "load": { # [Pick one] Configures a load job. |
| 2713 | "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 2714 | "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. |
| 2715 | "fields": [ # Describes the fields in a table. |
| 2716 | { |
| 2717 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 2718 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 2719 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 2720 | "A String", |
| 2721 | ], |
| 2722 | }, |
| 2723 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 2724 | # Object with schema name: TableFieldSchema |
| 2725 | ], |
| 2726 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 2727 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 2728 | "policyTags": { |
| 2729 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 2730 | "A String", |
| 2731 | ], |
| 2732 | }, |
| 2733 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 2734 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2735 | ], |
| 2736 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2737 | "decimalTargetTypes": [ # [Trusted Tester] 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. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. 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. |
| 2738 | "A String", |
| 2739 | ], |
| 2740 | "skipLeadingRows": 42, # [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. |
| 2741 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2742 | "requirePartitionFilter": True or False, |
| 2743 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 2744 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 2745 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 2746 | }, |
| 2747 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2748 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2749 | }, |
| 2750 | "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: 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. |
| 2751 | "A String", |
| 2752 | ], |
| 2753 | "destinationTable": { # [Required] The destination table to load the data into. |
| 2754 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2755 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2756 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2757 | }, |
| 2758 | "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". |
| 2759 | "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. |
| 2760 | "A String", |
| 2761 | ], |
| 2762 | "maxBadRecords": 42, # [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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2763 | "allowJaggedRows": True or False, # [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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2764 | "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property. |
| 2765 | "autodetect": True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources. |
| 2766 | "encoding": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2767 | "destinationTableProperties": { # [Beta] [Optional] Properties with which to create the destination table if it is new. |
| 2768 | "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. |
| 2769 | "a_key": "A String", |
| 2770 | }, |
| 2771 | "description": "A 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. |
| 2772 | "friendlyName": "A String", # [Optional] The friendly name 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 friendly name is provided, the job will fail. |
| 2773 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2774 | "createDisposition": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2775 | "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. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2776 | "A String", |
| 2777 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2778 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2779 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 2780 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 2781 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 2782 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 2783 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 2784 | }, |
| 2785 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2786 | "useAvroLogicalTypes": True or False, # [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). |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2787 | "ignoreUnknownValues": True or False, # [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 |
| 2788 | "sourceFormat": "A 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2789 | "fieldDelimiter": "A 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 (','). |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2790 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 2791 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 2792 | "A String", |
| 2793 | ], |
| 2794 | }, |
| 2795 | "nullMarker": "A 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. |
| 2796 | "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. |
| 2797 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 2798 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 2799 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 2800 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 2801 | }, |
| 2802 | "writeDisposition": "A 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. |
| 2803 | }, |
| 2804 | "jobType": "A String", # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. |
| 2805 | "query": { # [Pick one] Configures a query job. |
| 2806 | "query": "A String", # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. |
| 2807 | "flattenResults": true, # [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. |
| 2808 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2809 | "field": "A String", # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64. |
| 2810 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 2811 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 2812 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 2813 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 2814 | }, |
| 2815 | }, |
| 2816 | "maximumBillingTier": 1, # [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. |
| 2817 | "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. |
| 2818 | "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size. |
| 2819 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2820 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2821 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2822 | }, |
| 2823 | "tableDefinitions": { # [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. |
| 2824 | "a_key": { |
| 2825 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 2826 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 2827 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 2828 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 2829 | }, |
| 2830 | "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. |
| 2831 | "fields": [ # Describes the fields in a table. |
| 2832 | { |
| 2833 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 2834 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 2835 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 2836 | "A String", |
| 2837 | ], |
| 2838 | }, |
| 2839 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 2840 | # Object with schema name: TableFieldSchema |
| 2841 | ], |
| 2842 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 2843 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 2844 | "policyTags": { |
| 2845 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 2846 | "A String", |
| 2847 | ], |
| 2848 | }, |
| 2849 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 2850 | }, |
| 2851 | ], |
| 2852 | }, |
| 2853 | "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 2854 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 2855 | "readRowkeyAsString": True or False, # [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false. |
| 2856 | "ignoreUnspecifiedColumnFamilies": True or False, # [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. |
| 2857 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 2858 | { |
| 2859 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 2860 | "onlyReadLatest": True or False, # [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. |
| 2861 | "familyId": "A String", # Identifier of the column family. |
| 2862 | "columns": [ # [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. |
| 2863 | { |
| 2864 | "fieldName": "A String", # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. |
| 2865 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 2866 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 2867 | "qualifierString": "A String", |
| 2868 | "qualifierEncoded": "A String", # [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 2869 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 2870 | }, |
| 2871 | ], |
| 2872 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 2873 | }, |
| 2874 | ], |
| 2875 | }, |
| 2876 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 2877 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 2878 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 2879 | "ignoreUnknownValues": True or False, # [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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. |
| 2880 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 2881 | "encoding": "A 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. |
| 2882 | "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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. |
| 2883 | "fieldDelimiter": "A String", # [Optional] The separator for fields 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). |
| 2884 | "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. |
| 2885 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 2886 | "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. |
| 2887 | }, |
| 2888 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 2889 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 2890 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 2891 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 2892 | }, |
| 2893 | "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. |
| 2894 | "A String", |
| 2895 | ], |
| 2896 | }, |
| 2897 | }, |
| 2898 | "queryParameters": [ # Query parameters for standard SQL queries. |
| 2899 | { |
| 2900 | "parameterValue": { # [Required] The value of this parameter. |
| 2901 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 2902 | # Object with schema name: QueryParameterValue |
| 2903 | ], |
| 2904 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
| 2905 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 2906 | "a_key": # Object with schema name: QueryParameterValue |
| 2907 | }, |
| 2908 | }, |
| 2909 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
| 2910 | "parameterType": { # [Required] The type of this parameter. |
| 2911 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
| 2912 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 2913 | { |
| 2914 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
| 2915 | "description": "A String", # [Optional] Human-oriented description of the field. |
| 2916 | "name": "A String", # [Optional] The name of this field. |
| 2917 | }, |
| 2918 | ], |
| 2919 | "type": "A String", # [Required] The top level type of this field. |
| 2920 | }, |
| 2921 | }, |
| 2922 | ], |
| 2923 | "allowLargeResults": false, # [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. |
| 2924 | "maximumBytesBilled": "A String", # [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. |
| 2925 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2926 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2927 | }, |
| 2928 | "useLegacySql": true, # 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. |
| 2929 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 2930 | "connectionProperties": [ # Connection properties. |
| 2931 | { |
| 2932 | "key": "A String", # [Required] Name of the connection property to set. |
| 2933 | "value": "A String", # [Required] Value of the connection property. |
| 2934 | }, |
| 2935 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2936 | "timePartitioning": { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified. |
| 2937 | "requirePartitionFilter": True or False, |
| 2938 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 2939 | "expirationMs": "A String", # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. |
| 2940 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| 2941 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2942 | "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: 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2943 | "A String", |
| 2944 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2945 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
| 2946 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 2947 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 2948 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 2949 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 2950 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2951 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2952 | "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. |
| 2953 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2954 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2955 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2956 | "useQueryCache": true, # [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. |
| 2957 | "clustering": { # [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered. |
| 2958 | "fields": [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| 2959 | "A String", |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2960 | ], |
| 2961 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2962 | "createDisposition": "A 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. |
| 2963 | "writeDisposition": "A 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. |
| 2964 | }, |
| 2965 | "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. |
| 2966 | "a_key": "A String", |
| 2967 | }, |
| 2968 | "jobTimeoutMs": "A String", # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job. |
| 2969 | "copy": { # [Pick one] Copies a table. |
| 2970 | "sourceTable": { # [Pick one] Source table to copy. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2971 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2972 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2973 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2974 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2975 | "destinationEncryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 2976 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 2977 | }, |
| 2978 | "destinationTable": { # [Required] The destination table |
| 2979 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2980 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2981 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2982 | }, |
| 2983 | "operationType": "A String", # [Optional] Supported operation types in table copy job. |
| 2984 | "writeDisposition": "A 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. |
| 2985 | "destinationExpirationTime": "", # [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2986 | "sourceTables": [ # [Pick one] Source tables to copy. |
| 2987 | { |
| 2988 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 2989 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 2990 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 2991 | }, |
| 2992 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 2993 | "createDisposition": "A 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. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 2994 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2995 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2996 | "user_email": "A String", # [Full-projection-only] Email address of the user who ran the job. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 2997 | }, |
| 2998 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 2999 | "kind": "bigquery#jobList", # The resource type of the response. |
| 3000 | "etag": "A String", # A hash of this page of results. |
| 3001 | "nextPageToken": "A String", # A token to request the next page of results. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3002 | }</pre> |
| 3003 | </div> |
| 3004 | |
| 3005 | <div class="method"> |
| 3006 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 3007 | <pre>Retrieves the next page of results. |
| 3008 | |
| 3009 | Args: |
| 3010 | previous_request: The request for the previous page. (required) |
| 3011 | previous_response: The response from the request for the previous page. (required) |
| 3012 | |
| 3013 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3014 | A request object that you can call 'execute()' on to request the next |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3015 | page. Returns None if there are no more items in the collection. |
| 3016 | </pre> |
| 3017 | </div> |
| 3018 | |
| 3019 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3020 | <code class="details" id="query">query(projectId, body=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3021 | <pre>Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. |
| 3022 | |
| 3023 | Args: |
| 3024 | projectId: string, Project ID of the project billed for the query (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3025 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3026 | The object takes the form of: |
| 3027 | |
| 3028 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3029 | "kind": "bigquery#queryRequest", # The resource type of the request. |
| 3030 | "location": "A String", # The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 3031 | "timeoutMs": 42, # [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds). |
| 3032 | "parameterMode": "A String", # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. |
| 3033 | "dryRun": True or False, # [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false. |
| 3034 | "useLegacySql": true, # 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. |
| 3035 | "preserveNulls": True or False, # [Deprecated] This property is deprecated. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3036 | "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. |
| 3037 | "a_key": "A String", |
| 3038 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3039 | "maximumBytesBilled": "A String", # [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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3040 | "defaultDataset": { # [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'. |
| 3041 | "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 3042 | "projectId": "A String", # [Optional] The ID of the project containing this dataset. |
| 3043 | }, |
| 3044 | "maxResults": 42, # [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3045 | "query": "A String", # [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]". |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3046 | "requestId": "A String", # A unique user provided identifier to ensure idempotent behavior for queries. Note that this is different from the job_id. It has the following properties: 1. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended. 2. Read only queries can ignore this token since they are nullipotent by definition. 3. For the purposes of idempotency ensured by the request_id, a request is considered duplicate of another only if they have the same request_id and are actually duplicates. When determining whether a request is a duplicate of the previous request, all parameters in the request that may affect the behavior are considered. For example, query, connection_properties, query_parameters, use_legacy_sql are parameters that affect the result and are considered when determining whether a request is a duplicate, but properties like timeout_ms don't affect the result and are thus not considered. Dry run query requests are never considered duplicate of another request. 4. When a duplicate mutating query request is detected, it returns: a. the results of the mutation if it completes successfully within the timeout. b. the running operation if it is still in progress at the end of the timeout. 5. Its lifetime is limited to 15 minutes. In other words, if two requests are sent with the same request_id, but more than 15 minutes apart, idempotency is not guaranteed. |
| 3047 | "connectionProperties": [ # Connection properties. |
| 3048 | { |
| 3049 | "key": "A String", # [Required] Name of the connection property to set. |
| 3050 | "value": "A String", # [Required] Value of the connection property. |
| 3051 | }, |
| 3052 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3053 | "queryParameters": [ # Query parameters for Standard SQL queries. |
| 3054 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3055 | "parameterValue": { # [Required] The value of this parameter. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3056 | "arrayValues": [ # [Optional] The array values, if this is an array type. |
| 3057 | # Object with schema name: QueryParameterValue |
| 3058 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3059 | "value": "A String", # [Optional] The value of this value, if a simple scalar type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3060 | "structValues": { # [Optional] The struct field values, in order of the struct type's declaration. |
| 3061 | "a_key": # Object with schema name: QueryParameterValue |
| 3062 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3063 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3064 | "name": "A String", # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3065 | "parameterType": { # [Required] The type of this parameter. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3066 | "arrayType": # Object with schema name: QueryParameterType # [Optional] The type of the array's elements, if this is an array. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3067 | "structTypes": [ # [Optional] The types of the fields of this struct, in order, if this is a struct. |
| 3068 | { |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3069 | "type": # Object with schema name: QueryParameterType # [Required] The type of this field. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3070 | "description": "A String", # [Optional] Human-oriented description of the field. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3071 | "name": "A String", # [Optional] The name of this field. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3072 | }, |
| 3073 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3074 | "type": "A String", # [Required] The top level type of this field. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 3075 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 3076 | }, |
| 3077 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3078 | "useQueryCache": true, # [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. The default value is true. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3079 | } |
| 3080 | |
| 3081 | |
| 3082 | Returns: |
| 3083 | An object of the form: |
| 3084 | |
| 3085 | { |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3086 | "totalRows": "A String", # The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. |
| 3087 | "errors": [ # [Output-only] The first errors or warnings 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 completed or was unsuccessful. |
| 3088 | { |
| 3089 | "reason": "A String", # A short error code that summarizes the error. |
| 3090 | "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 3091 | "location": "A String", # Specifies where the error occurred, if present. |
| 3092 | "message": "A String", # A human-readable description of the error. |
| 3093 | }, |
| 3094 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3095 | "schema": { # The schema of the results. Present only when the query completes successfully. |
| 3096 | "fields": [ # Describes the fields in a table. |
| 3097 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3098 | "type": "A String", # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). |
| 3099 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 3100 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 3101 | "A String", |
| 3102 | ], |
| 3103 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3104 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 3105 | # Object with schema name: TableFieldSchema |
| 3106 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3107 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3108 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3109 | "policyTags": { |
| 3110 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 3111 | "A String", |
| 3112 | ], |
| 3113 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3114 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3115 | }, |
| 3116 | ], |
| 3117 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3118 | "pageToken": "A String", # A token used for paging results. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3119 | "jobReference": { # Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). |
| 3120 | "projectId": "A String", # [Required] The ID of the project containing this job. |
| 3121 | "location": "A String", # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. |
| 3122 | "jobId": "A 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. |
| 3123 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3124 | "cacheHit": True or False, # Whether the query result was fetched from the query cache. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 3125 | "jobComplete": True or False, # Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3126 | "rows": [ # An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 3127 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3128 | "f": [ # Represents a single row in the result set, consisting of one or more fields. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 3129 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3130 | "v": "", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 3131 | }, |
| 3132 | ], |
| 3133 | }, |
| 3134 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 3135 | "numDmlAffectedRows": "A String", # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
| 3136 | "totalBytesProcessed": "A String", # The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. |
| 3137 | "kind": "bigquery#queryResponse", # The resource type. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 3138 | }</pre> |
| 3139 | </div> |
| 3140 | |
| 3141 | </body></html> |