blob: 034acd819436d185826c7e518465a736ea84e475 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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 Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#cancel">cancel(projectId, jobId, location=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070079<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 Manista4f877e52015-06-15 16:44:50 +000080<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#get">get(projectId, jobId, location=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000082<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 Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#getQueryResults">getQueryResults(projectId, jobId, startIndex=None, location=None, pageToken=None, timeoutMs=None, maxResults=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Retrieves the results of a query job.</p>
86<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#getQueryResults_next">getQueryResults_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080090 <code><a href="#insert">insert(projectId, body=None, media_body=None, media_mime_type=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000091<p class="firstline">Starts a new asynchronous job. Requires the Can View project role.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(projectId, stateFilter=None, projection=None, minCreationTime=None, parentJobId=None, allUsers=None, pageToken=None, maxCreationTime=None, maxResults=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<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 Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#query">query(projectId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.</p>
101<h3>Method Details</h3>
102<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 <code class="details" id="cancel">cancel(projectId, jobId, location=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104 <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 Manista4f877e52015-06-15 16:44:50 +0000105
106Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107 projectId: string, [Required] Project ID of the job to cancel (required)
108 jobId: string, [Required] Job ID of the job to cancel (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 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 Manista4f877e52015-06-15 16:44:50 +0000110
111Returns:
112 An object of the form:
113
114 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700115 &quot;job&quot;: { # The final state of the job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700116 &quot;status&quot;: { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
117 &quot;errors&quot;: [ # [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.
118 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
120 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
121 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
122 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
123 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700124 ],
125 &quot;state&quot;: &quot;A String&quot;, # [Output-only] Running state of the job.
126 &quot;errorResult&quot;: { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
127 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
128 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
129 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
130 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700132 },
133 &quot;statistics&quot;: { # [Output-only] Information about the job, including starting time and ending time of the job.
134 &quot;extract&quot;: { # [Output-only] Statistics for an extract job.
135 &quot;destinationUriFileCounts&quot;: [ # [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 &#x27;destinationUris&#x27; field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;A String&quot;,
137 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700138 &quot;inputBytes&quot;: &quot;A String&quot;, # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
139 },
140 &quot;endTime&quot;: &quot;A String&quot;, # [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.
141 &quot;completionRatio&quot;: 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -&gt; 1.0) for LOAD and EXTRACT jobs.
142 &quot;startTime&quot;: &quot;A String&quot;, # [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 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
144 &quot;scriptStatistics&quot;: { # [Output-only] Statistics for a child job of a script.
145 &quot;evaluationKind&quot;: &quot;A String&quot;, # [Output-only] Whether this child job was a statement or expression.
146 &quot;stackFrames&quot;: [ # 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.
147 {
148 &quot;procedureId&quot;: &quot;A String&quot;, # [Output-only] Name of the active procedure, empty if in a top-level script.
149 &quot;startLine&quot;: 42, # [Output-only] One-based start line.
150 &quot;text&quot;: &quot;A String&quot;, # [Output-only] Text of the current statement/expression.
151 &quot;endColumn&quot;: 42, # [Output-only] One-based end column.
152 &quot;endLine&quot;: 42, # [Output-only] One-based end line.
153 &quot;startColumn&quot;: 42, # [Output-only] One-based start column.
154 },
155 ],
156 },
157 &quot;query&quot;: { # [Output-only] Statistics for a query job.
158 &quot;timeline&quot;: [ # [Output-only] [Beta] Describes a timeline of job execution.
159 {
160 &quot;activeUnits&quot;: &quot;A String&quot;, # 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.
161 &quot;completedUnits&quot;: &quot;A String&quot;, # Total parallel units of work completed by this query.
162 &quot;elapsedMs&quot;: &quot;A String&quot;, # Milliseconds elapsed since the start of query execution.
163 &quot;pendingUnits&quot;: &quot;A String&quot;, # Total parallel units of work remaining for the active stages.
164 &quot;totalSlotMs&quot;: &quot;A String&quot;, # Cumulative slot-ms consumed by the query.
165 },
166 ],
167 &quot;ddlTargetRoutine&quot;: { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
168 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
169 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
170 &quot;routineId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700172 &quot;queryPlan&quot;: [ # [Output-only] Describes execution plan for the query.
173 {
174 &quot;steps&quot;: [ # List of operations within the stage in dependency order (approximately chronological).
175 {
176 &quot;substeps&quot;: [ # Human-readable stage descriptions.
177 &quot;A String&quot;,
178 ],
179 &quot;kind&quot;: &quot;A String&quot;, # Machine-readable operation type.
180 },
181 ],
182 &quot;startMs&quot;: &quot;A String&quot;, # Stage start time represented as milliseconds since epoch.
183 &quot;writeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on writing output.
184 &quot;shuffleOutputBytesSpilled&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle and spilled to disk.
185 &quot;readMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent reading input.
186 &quot;waitMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent waiting to be scheduled.
187 &quot;recordsRead&quot;: &quot;A String&quot;, # Number of records read into the stage.
188 &quot;writeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on writing output.
189 &quot;waitRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
190 &quot;waitMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent waiting to be scheduled.
191 &quot;writeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on writing output.
192 &quot;computeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
193 &quot;completedParallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments completed.
194 &quot;recordsWritten&quot;: &quot;A String&quot;, # Number of records written by the stage.
195 &quot;waitRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
196 &quot;readRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent reading input.
197 &quot;readRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent reading input.
198 &quot;id&quot;: &quot;A String&quot;, # Unique ID for stage within plan.
199 &quot;writeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on writing output.
200 &quot;endMs&quot;: &quot;A String&quot;, # Stage end time represented as milliseconds since epoch.
201 &quot;inputStages&quot;: [ # IDs for stages that are inputs to this stage.
202 &quot;A String&quot;,
203 ],
204 &quot;computeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on CPU-bound tasks.
205 &quot;computeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on CPU-bound tasks.
206 &quot;slotMs&quot;: &quot;A String&quot;, # Slot-milliseconds used by the stage.
207 &quot;readMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent reading input.
208 &quot;shuffleOutputBytes&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle.
209 &quot;parallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments to be processed.
210 &quot;status&quot;: &quot;A String&quot;, # Current status for the stage.
211 &quot;name&quot;: &quot;A String&quot;, # Human-readable name for stage.
212 &quot;computeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
213 },
214 ],
215 &quot;ddlTargetTable&quot;: { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
216 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
217 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
218 &quot;tableId&quot;: &quot;A String&quot;, # [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.
219 },
220 &quot;schema&quot;: { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
221 &quot;fields&quot;: [ # Describes the fields in a table.
222 {
223 &quot;name&quot;: &quot;A String&quot;, # [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.
224 &quot;type&quot;: &quot;A String&quot;, # [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).
225 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
226 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
227 &quot;A String&quot;,
228 ],
229 },
230 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
231 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
232 &quot;policyTags&quot;: {
233 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
234 &quot;A String&quot;,
235 ],
236 },
237 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
238 # Object with schema name: TableFieldSchema
239 ],
240 },
241 ],
242 },
243 &quot;estimatedBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] The original estimate of bytes processed for the job.
244 &quot;referencedTables&quot;: [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
245 {
246 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
247 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
248 &quot;tableId&quot;: &quot;A String&quot;, # [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.
249 },
250 ],
251 &quot;modelTrainingCurrentIteration&quot;: 42, # [Output-only, Beta] Deprecated; do not use.
252 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
253 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] Total bytes processed for the job.
254 &quot;statementType&quot;: &quot;A String&quot;, # The type of query statement, if valid. Possible values (new values might be added in the future): &quot;SELECT&quot;: SELECT query. &quot;INSERT&quot;: INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;UPDATE&quot;: UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;DELETE&quot;: DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;MERGE&quot;: MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;ALTER_TABLE&quot;: ALTER TABLE query. &quot;ALTER_VIEW&quot;: ALTER VIEW query. &quot;ASSERT&quot;: ASSERT condition AS &#x27;description&#x27;. &quot;CREATE_FUNCTION&quot;: CREATE FUNCTION query. &quot;CREATE_MODEL&quot;: CREATE [OR REPLACE] MODEL ... AS SELECT ... . &quot;CREATE_PROCEDURE&quot;: CREATE PROCEDURE query. &quot;CREATE_TABLE&quot;: CREATE [OR REPLACE] TABLE without AS SELECT. &quot;CREATE_TABLE_AS_SELECT&quot;: CREATE [OR REPLACE] TABLE ... AS SELECT ... . &quot;CREATE_VIEW&quot;: CREATE [OR REPLACE] VIEW ... AS SELECT ... . &quot;DROP_FUNCTION&quot; : DROP FUNCTION query. &quot;DROP_PROCEDURE&quot;: DROP PROCEDURE query. &quot;DROP_TABLE&quot;: DROP TABLE query. &quot;DROP_VIEW&quot;: DROP VIEW query.
255 &quot;ddlOperationPerformed&quot;: &quot;A String&quot;, # The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): &quot;CREATE&quot;: The query created the DDL target. &quot;SKIP&quot;: 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. &quot;REPLACE&quot;: The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. &quot;DROP&quot;: The query deleted the DDL target.
256 &quot;billingTier&quot;: 42, # [Output-only] Billing tier for the job.
257 &quot;ddlTargetRowAccessPolicy&quot;: { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
258 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this row access policy.
259 &quot;policyId&quot;: &quot;A String&quot;, # [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.
260 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table containing this row access policy.
261 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this row access policy.
262 },
263 &quot;modelTraining&quot;: { # [Output-only, Beta] Information about create model query job progress.
264 &quot;expectedTotalIterations&quot;: &quot;A String&quot;, # [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.
265 &quot;currentIteration&quot;: 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
266 },
267 &quot;cacheHit&quot;: True or False, # [Output-only] Whether the query result was fetched from the query cache.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
269 {
270 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
271 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
272 },
273 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700274 &quot;undeclaredQueryParameters&quot;: [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation.
275 {
276 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
277 &quot;parameterType&quot;: { # [Required] The type of this parameter.
278 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
279 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
280 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
281 {
282 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
283 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
284 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700286 ],
287 },
288 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
289 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
290 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700292 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
293 # Object with schema name: QueryParameterValue
294 ],
295 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700297 },
298 ],
299 &quot;totalPartitionsProcessed&quot;: &quot;A String&quot;, # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
300 &quot;modelTrainingExpectedTotalIteration&quot;: &quot;A String&quot;, # [Output-only, Beta] Deprecated; do not use.
301 &quot;ddlAffectedRowAccessPolicyCount&quot;: &quot;A String&quot;, # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
302 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
303 &quot;totalBytesBilled&quot;: &quot;A String&quot;, # [Output-only] Total bytes billed for the job.
304 &quot;totalBytesProcessedAccuracy&quot;: &quot;A String&quot;, # [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.
305 &quot;referencedRoutines&quot;: [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
306 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
308 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
309 &quot;routineId&quot;: &quot;A String&quot;, # [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.
310 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700311 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700313 &quot;numChildJobs&quot;: &quot;A String&quot;, # [Output-only] Number of child jobs executed.
314 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
315 &quot;parentJobId&quot;: &quot;A String&quot;, # [Output-only] If this is a child job, the id of the parent.
316 &quot;reservation_id&quot;: &quot;A String&quot;, # [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.
317 &quot;quotaDeferments&quot;: [ # [Output-only] Quotas which delayed this job&#x27;s start time.
318 &quot;A String&quot;,
319 ],
320 &quot;rowLevelSecurityStatistics&quot;: { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
321 &quot;rowLevelSecurityApplied&quot;: True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies.
322 },
323 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
324 {
325 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
326 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
327 },
328 ],
329 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
330 &quot;load&quot;: { # [Output-only] Statistics for a load job.
331 &quot;badRecords&quot;: &quot;A String&quot;, # [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.
332 &quot;inputFileBytes&quot;: &quot;A String&quot;, # [Output-only] Number of bytes of source data in a load job.
333 &quot;inputFiles&quot;: &quot;A String&quot;, # [Output-only] Number of source files in a load job.
334 &quot;outputRows&quot;: &quot;A String&quot;, # [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.
335 &quot;outputBytes&quot;: &quot;A String&quot;, # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
336 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000337 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700338 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
339 &quot;id&quot;: &quot;A String&quot;, # [Output-only] Opaque ID field of the job
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 &quot;configuration&quot;: { # [Required] Describes the job configuration.
341 &quot;copy&quot;: { # [Pick one] Copies a table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &quot;destinationTable&quot;: { # [Required] The destination table
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
344 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700345 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
348 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
349 },
350 &quot;sourceTables&quot;: [ # [Pick one] Source tables to copy.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
353 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700354 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 },
356 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 &quot;sourceTable&quot;: { # [Pick one] Source table to copy.
359 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
360 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
361 &quot;tableId&quot;: &quot;A String&quot;, # [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.
362 },
363 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;jobTimeoutMs&quot;: &quot;A String&quot;, # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
366 &quot;query&quot;: { # [Pick one] Configures a query job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700367 &quot;queryParameters&quot;: [ # Query parameters for standard SQL queries.
368 {
369 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
370 &quot;parameterType&quot;: { # [Required] The type of this parameter.
371 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
372 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
373 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
374 {
375 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
376 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
377 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
378 },
379 ],
380 },
381 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
382 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
383 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
384 },
385 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
386 # Object with schema name: QueryParameterValue
387 ],
388 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
389 },
390 },
391 ],
392 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
393 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
394 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
395 },
396 &quot;clustering&quot;: { # [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.
397 &quot;fields&quot;: [ # [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.
398 &quot;A String&quot;,
399 ],
400 },
401 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 &quot;maximumBytesBilled&quot;: &quot;A String&quot;, # [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.
403 &quot;schemaUpdateOptions&quot;: [ # 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.
404 &quot;A String&quot;,
405 ],
406 &quot;priority&quot;: &quot;A String&quot;, # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
407 &quot;connectionProperties&quot;: [ # Connection properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800408 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
410 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
411 },
412 ],
413 &quot;allowLargeResults&quot;: 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.
414 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
415 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
416 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
417 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
418 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
419 },
420 &quot;field&quot;: &quot;A String&quot;, # [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.
421 },
422 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
423 &quot;useQueryCache&quot;: 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.
424 &quot;flattenResults&quot;: 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.
425 &quot;tableDefinitions&quot;: { # [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.
426 &quot;a_key&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700427 &quot;compression&quot;: &quot;A String&quot;, # [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.
428 &quot;maxBadRecords&quot;: 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.
429 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
430 &quot;A String&quot;,
431 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
Bu Sun Kim65020912020-05-20 12:08:20 -0700433 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
434 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
435 &quot;allowJaggedRows&quot;: 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.
436 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700437 &quot;encoding&quot;: &quot;A String&quot;, # [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.
438 &quot;allowQuotedNewlines&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 },
440 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700441 &quot;readRowkeyAsString&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 &quot;onlyReadLatest&quot;: 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 &#x27;columns&#x27; and specifying a different setting for that column.
445 &quot;encoding&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying an encoding for it.
446 &quot;columns&quot;: [ # [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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700447 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;fieldName&quot;: &quot;A String&quot;, # [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.
449 &quot;qualifierString&quot;: &quot;A String&quot;,
450 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
451 &quot;type&quot;: &quot;A String&quot;, # [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. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700452 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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.
453 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700454 },
455 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;type&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying a type for it.
457 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700458 },
459 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;ignoreUnspecifiedColumnFamilies&quot;: 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700461 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 &quot;schema&quot;: { # [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.
463 &quot;fields&quot;: [ # Describes the fields in a table.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800464 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;name&quot;: &quot;A String&quot;, # [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.
466 &quot;type&quot;: &quot;A String&quot;, # [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).
467 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
468 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
469 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700470 ],
471 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
473 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
474 &quot;policyTags&quot;: {
475 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
476 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 ],
478 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700479 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
480 # Object with schema name: TableFieldSchema
481 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800482 },
483 ],
484 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700485 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
487 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
488 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
489 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700490 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
491 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
492 &quot;range&quot;: &quot;A String&quot;, # [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
493 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
494 },
495 &quot;ignoreUnknownValues&quot;: 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&#x27;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.
496 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800497 },
498 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;defaultDataset&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700500 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700501 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 },
503 &quot;maximumBillingTier&quot;: 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.
504 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
505 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700506 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
508 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
509 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 },
511 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
512 &quot;query&quot;: &quot;A String&quot;, # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
513 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700514 { # 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
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700516 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700517 },
518 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;destinationTable&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
521 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700522 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 },
525 &quot;dryRun&quot;: True or False, # [Optional] If set, don&#x27;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&#x27;t a dry run. Behavior of non-query jobs is undefined.
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;load&quot;: { # [Pick one] Configures a load job.
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;nullMarker&quot;: &quot;A String&quot;, # [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify &quot;\N&quot;, BigQuery interprets &quot;\N&quot; 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.
528 &quot;schema&quot;: { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you&#x27;re loading data from Google Cloud Datastore.
529 &quot;fields&quot;: [ # Describes the fields in a table.
530 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 &quot;name&quot;: &quot;A String&quot;, # [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.
532 &quot;type&quot;: &quot;A String&quot;, # [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).
533 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
534 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
535 &quot;A String&quot;,
536 ],
537 },
538 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
539 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
540 &quot;policyTags&quot;: {
541 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
542 &quot;A String&quot;,
543 ],
544 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700545 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
546 # Object with schema name: TableFieldSchema
547 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 },
549 ],
550 },
551 &quot;schemaInlineFormat&quot;: &quot;A String&quot;, # [Deprecated] The format of the schemaInline property.
552 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
553 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
554 &quot;destinationTableProperties&quot;: { # [Beta] [Optional] Properties with which to create the destination table if it is new.
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &quot;labels&quot;: { # [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.
556 &quot;a_key&quot;: &quot;A String&quot;,
557 },
558 &quot;friendlyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700559 &quot;description&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Optional] The format of the data files. For CSV files, specify &quot;CSV&quot;. For datastore backups, specify &quot;DATASTORE_BACKUP&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro, specify &quot;AVRO&quot;. For parquet, specify &quot;PARQUET&quot;. For orc, specify &quot;ORC&quot;. The default value is CSV.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700562 &quot;ignoreUnknownValues&quot;: 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&#x27;t match any column names
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;destinationTable&quot;: { # [Required] The destination table to load the data into.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
565 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700566 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700567 },
568 &quot;encoding&quot;: &quot;A String&quot;, # [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.
569 &quot;clustering&quot;: { # [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.
570 &quot;fields&quot;: [ # [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.
571 &quot;A String&quot;,
572 ],
573 },
574 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
575 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
576 &quot;A String&quot;,
577 ],
578 &quot;maxBadRecords&quot;: 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.
579 &quot;allowJaggedRows&quot;: 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.
580 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
581 &quot;projectionFields&quot;: [ # If sourceFormat is set to &quot;DATASTORE_BACKUP&quot;, 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&#x27;t found in the Cloud Datastore backup, an invalid error is returned in the job result.
582 &quot;A String&quot;,
583 ],
584 &quot;allowQuotedNewlines&quot;: True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
585 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
586 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
587 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
588 },
589 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If sourceFormat is set to &quot;AVRO&quot;, indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700591 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
593 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
594 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700595 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700596 &quot;skipLeadingRows&quot;: 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.
597 &quot;autodetect&quot;: True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
598 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
599 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
600 },
601 &quot;schemaUpdateOptions&quot;: [ # 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.
602 &quot;A String&quot;,
603 ],
604 &quot;schemaInline&quot;: &quot;A String&quot;, # [Deprecated] The inline schema. For CSV schemas, specify as &quot;Field1:Type1[,Field2:Type2]*&quot;. For example, &quot;foo:STRING, bar:INTEGER, baz:FLOAT&quot;.
605 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
606 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
607 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
608 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
609 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
610 },
611 &quot;field&quot;: &quot;A String&quot;, # [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.
612 },
613 },
614 &quot;labels&quot;: { # 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.
615 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700616 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 &quot;jobType&quot;: &quot;A String&quot;, # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
618 &quot;extract&quot;: { # [Pick one] Configures an extract job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700619 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] Delimiter to use between fields in the exported data. Default is &#x27;,&#x27;. Not applicable when extracting models.
620 &quot;destinationUri&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;printHeader&quot;: true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
622 &quot;compression&quot;: &quot;A String&quot;, # [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.
623 &quot;destinationUris&quot;: [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
624 &quot;A String&quot;,
625 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700626 &quot;destinationFormat&quot;: &quot;A String&quot;, # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;sourceModel&quot;: { # A reference to the model being exported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700628 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
630 &quot;modelId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700632 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If destinationFormat is set to &quot;AVRO&quot;, 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.
633 &quot;sourceTable&quot;: { # A reference to the table being exported.
634 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
635 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
636 &quot;tableId&quot;: &quot;A String&quot;, # [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.
637 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 },
John Asmuth614db982014-04-24 15:46:26 -0400639 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;user_email&quot;: &quot;A String&quot;, # [Output-only] Email address of the user who ran the job.
641 &quot;kind&quot;: &quot;bigquery#job&quot;, # [Output-only] The type of the resource.
642 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of this resource.
643 &quot;jobReference&quot;: { # [Optional] Reference describing the unique-per-user name of the job.
644 &quot;jobId&quot;: &quot;A String&quot;, # [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.
645 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
646 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
647 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700648 },
649 &quot;kind&quot;: &quot;bigquery#jobCancelResponse&quot;, # The resource type of the response.
650 }</pre>
651</div>
652
653<div class="method">
654 <code class="details" id="get">get(projectId, jobId, location=None)</code>
655 <pre>Returns information about a specific job. Job information is available for a six month period after creation. Requires that you&#x27;re the person who ran the job, or have the Is Owner project role.
656
657Args:
658 projectId: string, [Required] Project ID of the requested job (required)
659 jobId: string, [Required] Job ID of the requested job (required)
660 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.
661
662Returns:
663 An object of the form:
664
665 {
666 &quot;status&quot;: { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
667 &quot;errors&quot;: [ # [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.
668 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
670 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
671 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
672 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
673 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700674 ],
675 &quot;state&quot;: &quot;A String&quot;, # [Output-only] Running state of the job.
676 &quot;errorResult&quot;: { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
677 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
678 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
679 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
680 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700682 },
683 &quot;statistics&quot;: { # [Output-only] Information about the job, including starting time and ending time of the job.
684 &quot;extract&quot;: { # [Output-only] Statistics for an extract job.
685 &quot;destinationUriFileCounts&quot;: [ # [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 &#x27;destinationUris&#x27; field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;A String&quot;,
687 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700688 &quot;inputBytes&quot;: &quot;A String&quot;, # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
689 },
690 &quot;endTime&quot;: &quot;A String&quot;, # [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.
691 &quot;completionRatio&quot;: 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -&gt; 1.0) for LOAD and EXTRACT jobs.
692 &quot;startTime&quot;: &quot;A String&quot;, # [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.
693 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
694 &quot;scriptStatistics&quot;: { # [Output-only] Statistics for a child job of a script.
695 &quot;evaluationKind&quot;: &quot;A String&quot;, # [Output-only] Whether this child job was a statement or expression.
696 &quot;stackFrames&quot;: [ # 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.
697 {
698 &quot;procedureId&quot;: &quot;A String&quot;, # [Output-only] Name of the active procedure, empty if in a top-level script.
699 &quot;startLine&quot;: 42, # [Output-only] One-based start line.
700 &quot;text&quot;: &quot;A String&quot;, # [Output-only] Text of the current statement/expression.
701 &quot;endColumn&quot;: 42, # [Output-only] One-based end column.
702 &quot;endLine&quot;: 42, # [Output-only] One-based end line.
703 &quot;startColumn&quot;: 42, # [Output-only] One-based start column.
704 },
705 ],
706 },
707 &quot;query&quot;: { # [Output-only] Statistics for a query job.
708 &quot;timeline&quot;: [ # [Output-only] [Beta] Describes a timeline of job execution.
709 {
710 &quot;activeUnits&quot;: &quot;A String&quot;, # 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.
711 &quot;completedUnits&quot;: &quot;A String&quot;, # Total parallel units of work completed by this query.
712 &quot;elapsedMs&quot;: &quot;A String&quot;, # Milliseconds elapsed since the start of query execution.
713 &quot;pendingUnits&quot;: &quot;A String&quot;, # Total parallel units of work remaining for the active stages.
714 &quot;totalSlotMs&quot;: &quot;A String&quot;, # Cumulative slot-ms consumed by the query.
715 },
716 ],
717 &quot;ddlTargetRoutine&quot;: { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
718 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
719 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
720 &quot;routineId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700722 &quot;queryPlan&quot;: [ # [Output-only] Describes execution plan for the query.
723 {
724 &quot;steps&quot;: [ # List of operations within the stage in dependency order (approximately chronological).
725 {
726 &quot;substeps&quot;: [ # Human-readable stage descriptions.
727 &quot;A String&quot;,
728 ],
729 &quot;kind&quot;: &quot;A String&quot;, # Machine-readable operation type.
730 },
731 ],
732 &quot;startMs&quot;: &quot;A String&quot;, # Stage start time represented as milliseconds since epoch.
733 &quot;writeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on writing output.
734 &quot;shuffleOutputBytesSpilled&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle and spilled to disk.
735 &quot;readMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent reading input.
736 &quot;waitMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent waiting to be scheduled.
737 &quot;recordsRead&quot;: &quot;A String&quot;, # Number of records read into the stage.
738 &quot;writeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on writing output.
739 &quot;waitRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
740 &quot;waitMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent waiting to be scheduled.
741 &quot;writeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on writing output.
742 &quot;computeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
743 &quot;completedParallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments completed.
744 &quot;recordsWritten&quot;: &quot;A String&quot;, # Number of records written by the stage.
745 &quot;waitRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
746 &quot;readRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent reading input.
747 &quot;readRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent reading input.
748 &quot;id&quot;: &quot;A String&quot;, # Unique ID for stage within plan.
749 &quot;writeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on writing output.
750 &quot;endMs&quot;: &quot;A String&quot;, # Stage end time represented as milliseconds since epoch.
751 &quot;inputStages&quot;: [ # IDs for stages that are inputs to this stage.
752 &quot;A String&quot;,
753 ],
754 &quot;computeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on CPU-bound tasks.
755 &quot;computeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on CPU-bound tasks.
756 &quot;slotMs&quot;: &quot;A String&quot;, # Slot-milliseconds used by the stage.
757 &quot;readMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent reading input.
758 &quot;shuffleOutputBytes&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle.
759 &quot;parallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments to be processed.
760 &quot;status&quot;: &quot;A String&quot;, # Current status for the stage.
761 &quot;name&quot;: &quot;A String&quot;, # Human-readable name for stage.
762 &quot;computeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
763 },
764 ],
765 &quot;ddlTargetTable&quot;: { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
766 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
767 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
768 &quot;tableId&quot;: &quot;A String&quot;, # [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.
769 },
770 &quot;schema&quot;: { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
771 &quot;fields&quot;: [ # Describes the fields in a table.
772 {
773 &quot;name&quot;: &quot;A String&quot;, # [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.
774 &quot;type&quot;: &quot;A String&quot;, # [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).
775 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
776 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
777 &quot;A String&quot;,
778 ],
779 },
780 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
781 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
782 &quot;policyTags&quot;: {
783 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
784 &quot;A String&quot;,
785 ],
786 },
787 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
788 # Object with schema name: TableFieldSchema
789 ],
790 },
791 ],
792 },
793 &quot;estimatedBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] The original estimate of bytes processed for the job.
794 &quot;referencedTables&quot;: [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
795 {
796 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
797 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
798 &quot;tableId&quot;: &quot;A String&quot;, # [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.
799 },
800 ],
801 &quot;modelTrainingCurrentIteration&quot;: 42, # [Output-only, Beta] Deprecated; do not use.
802 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
803 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] Total bytes processed for the job.
804 &quot;statementType&quot;: &quot;A String&quot;, # The type of query statement, if valid. Possible values (new values might be added in the future): &quot;SELECT&quot;: SELECT query. &quot;INSERT&quot;: INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;UPDATE&quot;: UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;DELETE&quot;: DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;MERGE&quot;: MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;ALTER_TABLE&quot;: ALTER TABLE query. &quot;ALTER_VIEW&quot;: ALTER VIEW query. &quot;ASSERT&quot;: ASSERT condition AS &#x27;description&#x27;. &quot;CREATE_FUNCTION&quot;: CREATE FUNCTION query. &quot;CREATE_MODEL&quot;: CREATE [OR REPLACE] MODEL ... AS SELECT ... . &quot;CREATE_PROCEDURE&quot;: CREATE PROCEDURE query. &quot;CREATE_TABLE&quot;: CREATE [OR REPLACE] TABLE without AS SELECT. &quot;CREATE_TABLE_AS_SELECT&quot;: CREATE [OR REPLACE] TABLE ... AS SELECT ... . &quot;CREATE_VIEW&quot;: CREATE [OR REPLACE] VIEW ... AS SELECT ... . &quot;DROP_FUNCTION&quot; : DROP FUNCTION query. &quot;DROP_PROCEDURE&quot;: DROP PROCEDURE query. &quot;DROP_TABLE&quot;: DROP TABLE query. &quot;DROP_VIEW&quot;: DROP VIEW query.
805 &quot;ddlOperationPerformed&quot;: &quot;A String&quot;, # The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): &quot;CREATE&quot;: The query created the DDL target. &quot;SKIP&quot;: 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. &quot;REPLACE&quot;: The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. &quot;DROP&quot;: The query deleted the DDL target.
806 &quot;billingTier&quot;: 42, # [Output-only] Billing tier for the job.
807 &quot;ddlTargetRowAccessPolicy&quot;: { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
808 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this row access policy.
809 &quot;policyId&quot;: &quot;A String&quot;, # [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.
810 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table containing this row access policy.
811 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this row access policy.
812 },
813 &quot;modelTraining&quot;: { # [Output-only, Beta] Information about create model query job progress.
814 &quot;expectedTotalIterations&quot;: &quot;A String&quot;, # [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.
815 &quot;currentIteration&quot;: 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
816 },
817 &quot;cacheHit&quot;: True or False, # [Output-only] Whether the query result was fetched from the query cache.
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
819 {
820 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
821 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
822 },
823 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700824 &quot;undeclaredQueryParameters&quot;: [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation.
825 {
826 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
827 &quot;parameterType&quot;: { # [Required] The type of this parameter.
828 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
829 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
830 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
831 {
832 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
833 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
834 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700836 ],
837 },
838 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
839 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
840 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700842 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
843 # Object with schema name: QueryParameterValue
844 ],
845 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700847 },
848 ],
849 &quot;totalPartitionsProcessed&quot;: &quot;A String&quot;, # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
850 &quot;modelTrainingExpectedTotalIteration&quot;: &quot;A String&quot;, # [Output-only, Beta] Deprecated; do not use.
851 &quot;ddlAffectedRowAccessPolicyCount&quot;: &quot;A String&quot;, # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
852 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
853 &quot;totalBytesBilled&quot;: &quot;A String&quot;, # [Output-only] Total bytes billed for the job.
854 &quot;totalBytesProcessedAccuracy&quot;: &quot;A String&quot;, # [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.
855 &quot;referencedRoutines&quot;: [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
856 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
858 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
859 &quot;routineId&quot;: &quot;A String&quot;, # [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.
860 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700861 ],
862 },
863 &quot;numChildJobs&quot;: &quot;A String&quot;, # [Output-only] Number of child jobs executed.
864 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
865 &quot;parentJobId&quot;: &quot;A String&quot;, # [Output-only] If this is a child job, the id of the parent.
866 &quot;reservation_id&quot;: &quot;A String&quot;, # [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.
867 &quot;quotaDeferments&quot;: [ # [Output-only] Quotas which delayed this job&#x27;s start time.
868 &quot;A String&quot;,
869 ],
870 &quot;rowLevelSecurityStatistics&quot;: { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
871 &quot;rowLevelSecurityApplied&quot;: True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies.
872 },
873 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
874 {
875 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
876 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
877 },
878 ],
879 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
880 &quot;load&quot;: { # [Output-only] Statistics for a load job.
881 &quot;badRecords&quot;: &quot;A String&quot;, # [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.
882 &quot;inputFileBytes&quot;: &quot;A String&quot;, # [Output-only] Number of bytes of source data in a load job.
883 &quot;inputFiles&quot;: &quot;A String&quot;, # [Output-only] Number of source files in a load job.
884 &quot;outputRows&quot;: &quot;A String&quot;, # [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.
885 &quot;outputBytes&quot;: &quot;A String&quot;, # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
886 },
887 },
888 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
889 &quot;id&quot;: &quot;A String&quot;, # [Output-only] Opaque ID field of the job
890 &quot;configuration&quot;: { # [Required] Describes the job configuration.
891 &quot;copy&quot;: { # [Pick one] Copies a table.
892 &quot;destinationTable&quot;: { # [Required] The destination table
893 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
894 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
895 &quot;tableId&quot;: &quot;A String&quot;, # [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.
896 },
897 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
898 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
899 },
900 &quot;sourceTables&quot;: [ # [Pick one] Source tables to copy.
901 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
903 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700904 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700906 ],
907 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
908 &quot;sourceTable&quot;: { # [Pick one] Source table to copy.
909 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
910 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
911 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700913 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700915 &quot;jobTimeoutMs&quot;: &quot;A String&quot;, # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
916 &quot;query&quot;: { # [Pick one] Configures a query job.
917 &quot;queryParameters&quot;: [ # Query parameters for standard SQL queries.
918 {
919 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
920 &quot;parameterType&quot;: { # [Required] The type of this parameter.
921 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
922 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
923 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
924 {
925 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
926 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
927 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
928 },
929 ],
930 },
931 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
932 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
933 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
934 },
935 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
936 # Object with schema name: QueryParameterValue
937 ],
938 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
939 },
940 },
941 ],
942 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
943 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
944 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
945 },
946 &quot;clustering&quot;: { # [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.
947 &quot;fields&quot;: [ # [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.
948 &quot;A String&quot;,
949 ],
950 },
951 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
952 &quot;maximumBytesBilled&quot;: &quot;A String&quot;, # [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.
953 &quot;schemaUpdateOptions&quot;: [ # 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.
954 &quot;A String&quot;,
955 ],
956 &quot;priority&quot;: &quot;A String&quot;, # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
957 &quot;connectionProperties&quot;: [ # Connection properties.
958 {
959 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
960 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
961 },
962 ],
963 &quot;allowLargeResults&quot;: 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.
964 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
965 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
966 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
967 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
968 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
969 },
970 &quot;field&quot;: &quot;A String&quot;, # [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.
971 },
972 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
973 &quot;useQueryCache&quot;: 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.
974 &quot;flattenResults&quot;: 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.
975 &quot;tableDefinitions&quot;: { # [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.
976 &quot;a_key&quot;: {
977 &quot;compression&quot;: &quot;A String&quot;, # [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.
978 &quot;maxBadRecords&quot;: 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.
979 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
980 &quot;A String&quot;,
981 ],
982 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
983 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
984 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
985 &quot;allowJaggedRows&quot;: 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.
986 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
987 &quot;encoding&quot;: &quot;A String&quot;, # [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.
988 &quot;allowQuotedNewlines&quot;: 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.
989 },
990 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
991 &quot;readRowkeyAsString&quot;: 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.
992 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
993 {
994 &quot;onlyReadLatest&quot;: 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 &#x27;columns&#x27; and specifying a different setting for that column.
995 &quot;encoding&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying an encoding for it.
996 &quot;columns&quot;: [ # [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.
997 {
998 &quot;fieldName&quot;: &quot;A String&quot;, # [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.
999 &quot;qualifierString&quot;: &quot;A String&quot;,
1000 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1001 &quot;type&quot;: &quot;A String&quot;, # [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. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1002 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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.
1003 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1004 },
1005 ],
1006 &quot;type&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying a type for it.
1007 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1008 },
1009 ],
1010 &quot;ignoreUnspecifiedColumnFamilies&quot;: 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.
1011 },
1012 &quot;schema&quot;: { # [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.
1013 &quot;fields&quot;: [ # Describes the fields in a table.
1014 {
1015 &quot;name&quot;: &quot;A String&quot;, # [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.
1016 &quot;type&quot;: &quot;A String&quot;, # [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).
1017 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1018 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1019 &quot;A String&quot;,
1020 ],
1021 },
1022 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1023 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1024 &quot;policyTags&quot;: {
1025 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1026 &quot;A String&quot;,
1027 ],
1028 },
1029 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1030 # Object with schema name: TableFieldSchema
1031 ],
1032 },
1033 ],
1034 },
1035 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
1036 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1037 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1038 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1039 },
1040 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1041 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1042 &quot;range&quot;: &quot;A String&quot;, # [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
1043 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1044 },
1045 &quot;ignoreUnknownValues&quot;: 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&#x27;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.
1046 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1047 },
1048 },
1049 &quot;defaultDataset&quot;: { # [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.
1050 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
1051 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
1052 },
1053 &quot;maximumBillingTier&quot;: 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.
1054 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
1055 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1056 &quot;requirePartitionFilter&quot;: True or False,
1057 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
1058 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
1059 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1060 },
1061 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
1062 &quot;query&quot;: &quot;A String&quot;, # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
1063 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1064 { # 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
1065 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
1066 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1067 },
1068 ],
1069 &quot;destinationTable&quot;: { # [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.
1070 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1071 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1072 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1073 },
1074 },
1075 &quot;dryRun&quot;: True or False, # [Optional] If set, don&#x27;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&#x27;t a dry run. Behavior of non-query jobs is undefined.
1076 &quot;load&quot;: { # [Pick one] Configures a load job.
1077 &quot;nullMarker&quot;: &quot;A String&quot;, # [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify &quot;\N&quot;, BigQuery interprets &quot;\N&quot; 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.
1078 &quot;schema&quot;: { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you&#x27;re loading data from Google Cloud Datastore.
1079 &quot;fields&quot;: [ # Describes the fields in a table.
1080 {
1081 &quot;name&quot;: &quot;A String&quot;, # [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.
1082 &quot;type&quot;: &quot;A String&quot;, # [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).
1083 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1084 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1085 &quot;A String&quot;,
1086 ],
1087 },
1088 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1089 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1090 &quot;policyTags&quot;: {
1091 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1092 &quot;A String&quot;,
1093 ],
1094 },
1095 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1096 # Object with schema name: TableFieldSchema
1097 ],
1098 },
1099 ],
1100 },
1101 &quot;schemaInlineFormat&quot;: &quot;A String&quot;, # [Deprecated] The format of the schemaInline property.
1102 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1103 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
1104 &quot;destinationTableProperties&quot;: { # [Beta] [Optional] Properties with which to create the destination table if it is new.
1105 &quot;labels&quot;: { # [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.
1106 &quot;a_key&quot;: &quot;A String&quot;,
1107 },
1108 &quot;friendlyName&quot;: &quot;A String&quot;, # [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.
1109 &quot;description&quot;: &quot;A String&quot;, # [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.
1110 },
1111 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Optional] The format of the data files. For CSV files, specify &quot;CSV&quot;. For datastore backups, specify &quot;DATASTORE_BACKUP&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro, specify &quot;AVRO&quot;. For parquet, specify &quot;PARQUET&quot;. For orc, specify &quot;ORC&quot;. The default value is CSV.
1112 &quot;ignoreUnknownValues&quot;: 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&#x27;t match any column names
1113 &quot;destinationTable&quot;: { # [Required] The destination table to load the data into.
1114 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1115 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1116 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1117 },
1118 &quot;encoding&quot;: &quot;A String&quot;, # [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.
1119 &quot;clustering&quot;: { # [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.
1120 &quot;fields&quot;: [ # [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.
1121 &quot;A String&quot;,
1122 ],
1123 },
1124 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
1125 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1126 &quot;A String&quot;,
1127 ],
1128 &quot;maxBadRecords&quot;: 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.
1129 &quot;allowJaggedRows&quot;: 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.
1130 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1131 &quot;projectionFields&quot;: [ # If sourceFormat is set to &quot;DATASTORE_BACKUP&quot;, 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&#x27;t found in the Cloud Datastore backup, an invalid error is returned in the job result.
1132 &quot;A String&quot;,
1133 ],
1134 &quot;allowQuotedNewlines&quot;: True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1135 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1136 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1137 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1138 },
1139 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If sourceFormat is set to &quot;AVRO&quot;, indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
1140 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1141 &quot;requirePartitionFilter&quot;: True or False,
1142 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
1143 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
1144 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1145 },
1146 &quot;skipLeadingRows&quot;: 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.
1147 &quot;autodetect&quot;: True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
1148 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1149 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
1150 },
1151 &quot;schemaUpdateOptions&quot;: [ # 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.
1152 &quot;A String&quot;,
1153 ],
1154 &quot;schemaInline&quot;: &quot;A String&quot;, # [Deprecated] The inline schema. For CSV schemas, specify as &quot;Field1:Type1[,Field2:Type2]*&quot;. For example, &quot;foo:STRING, bar:INTEGER, baz:FLOAT&quot;.
1155 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1156 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1157 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1158 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1159 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
1160 },
1161 &quot;field&quot;: &quot;A String&quot;, # [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.
1162 },
1163 },
1164 &quot;labels&quot;: { # 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.
1165 &quot;a_key&quot;: &quot;A String&quot;,
1166 },
1167 &quot;jobType&quot;: &quot;A String&quot;, # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
1168 &quot;extract&quot;: { # [Pick one] Configures an extract job.
1169 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] Delimiter to use between fields in the exported data. Default is &#x27;,&#x27;. Not applicable when extracting models.
1170 &quot;destinationUri&quot;: &quot;A String&quot;, # [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.
1171 &quot;printHeader&quot;: true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
1172 &quot;compression&quot;: &quot;A String&quot;, # [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.
1173 &quot;destinationUris&quot;: [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
1174 &quot;A String&quot;,
1175 ],
1176 &quot;destinationFormat&quot;: &quot;A String&quot;, # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON 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.
1177 &quot;sourceModel&quot;: { # A reference to the model being exported.
1178 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
1179 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1180 &quot;modelId&quot;: &quot;A String&quot;, # [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.
1181 },
1182 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If destinationFormat is set to &quot;AVRO&quot;, 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.
1183 &quot;sourceTable&quot;: { # A reference to the table being exported.
1184 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1185 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1186 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1187 },
1188 },
1189 },
1190 &quot;user_email&quot;: &quot;A String&quot;, # [Output-only] Email address of the user who ran the job.
1191 &quot;kind&quot;: &quot;bigquery#job&quot;, # [Output-only] The type of the resource.
1192 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of this resource.
1193 &quot;jobReference&quot;: { # [Optional] Reference describing the unique-per-user name of the job.
1194 &quot;jobId&quot;: &quot;A String&quot;, # [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.
1195 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
1196 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
1197 },
1198 }</pre>
John Asmuth614db982014-04-24 15:46:26 -04001199</div>
1200
1201<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 <code class="details" id="getQueryResults">getQueryResults(projectId, jobId, startIndex=None, location=None, pageToken=None, timeoutMs=None, maxResults=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001203 <pre>Retrieves the results of a query job.
1204
1205Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001206 projectId: string, [Required] Project ID of the query job (required)
1207 jobId: string, [Required] Job ID of the query job (required)
John Asmuth614db982014-04-24 15:46:26 -04001208 startIndex: string, Zero-based index of the starting row
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001210 pageToken: string, Page token, returned by a previous call, to request the next page of results
1211 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 &#x27;jobComplete&#x27; field in the response will be false
1212 maxResults: integer, Maximum number of results to read
John Asmuth614db982014-04-24 15:46:26 -04001213
1214Returns:
1215 An object of the form:
1216
1217 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;schema&quot;: { # The schema of the results. Present only when the query completes successfully.
1219 &quot;fields&quot;: [ # Describes the fields in a table.
1220 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &quot;name&quot;: &quot;A String&quot;, # [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.
1222 &quot;type&quot;: &quot;A String&quot;, # [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).
1223 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1224 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1225 &quot;A String&quot;,
1226 ],
1227 },
1228 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1229 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1230 &quot;policyTags&quot;: {
1231 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1232 &quot;A String&quot;,
1233 ],
1234 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001235 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1236 # Object with schema name: TableFieldSchema
1237 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 },
1239 ],
1240 },
1241 &quot;errors&quot;: [ # [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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001242 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
1244 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
1245 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
1246 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
1247 },
1248 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001249 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # The total number of bytes processed for this query.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001250 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1251 &quot;jobComplete&quot;: 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.
1252 &quot;totalRows&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001253 &quot;rows&quot;: [ # 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.
1254 {
1255 &quot;f&quot;: [ # Represents a single row in the result set, consisting of one or more fields.
Takashi Matsuo06694102015-09-11 13:55:40 -07001256 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 &quot;v&quot;: &quot;&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001258 },
1259 ],
1260 },
1261 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001262 &quot;pageToken&quot;: &quot;A String&quot;, # A token used for paging results.
1263 &quot;kind&quot;: &quot;bigquery#getQueryResultsResponse&quot;, # The resource type of the response.
1264 &quot;etag&quot;: &quot;A String&quot;, # A hash of this response.
Bu Sun Kim65020912020-05-20 12:08:20 -07001265 &quot;jobReference&quot;: { # 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).
1266 &quot;jobId&quot;: &quot;A String&quot;, # [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.
1267 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
1268 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
John Asmuth614db982014-04-24 15:46:26 -04001269 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001270 &quot;cacheHit&quot;: True or False, # Whether the query result was fetched from the query cache.
John Asmuth614db982014-04-24 15:46:26 -04001271 }</pre>
1272</div>
1273
1274<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001275 <code class="details" id="getQueryResults_next">getQueryResults_next(previous_request, previous_response)</code>
1276 <pre>Retrieves the next page of results.
1277
1278Args:
1279 previous_request: The request for the previous page. (required)
1280 previous_response: The response from the request for the previous page. (required)
1281
1282Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001284 page. Returns None if there are no more items in the collection.
1285 </pre>
1286</div>
1287
1288<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001289 <code class="details" id="insert">insert(projectId, body=None, media_body=None, media_mime_type=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001290 <pre>Starts a new asynchronous job. Requires the Can View project role.
John Asmuth614db982014-04-24 15:46:26 -04001291
1292Args:
1293 projectId: string, Project ID of the project that will be billed for the job (required)
1294 body: object, The request body.
1295 The object takes the form of:
1296
1297{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001298 &quot;status&quot;: { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
1299 &quot;errors&quot;: [ # [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.
1300 {
1301 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
1302 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
1303 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
1304 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
1305 },
1306 ],
1307 &quot;state&quot;: &quot;A String&quot;, # [Output-only] Running state of the job.
1308 &quot;errorResult&quot;: { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
1309 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
1310 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
1311 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
1312 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
1313 },
1314 },
1315 &quot;statistics&quot;: { # [Output-only] Information about the job, including starting time and ending time of the job.
1316 &quot;extract&quot;: { # [Output-only] Statistics for an extract job.
1317 &quot;destinationUriFileCounts&quot;: [ # [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 &#x27;destinationUris&#x27; field.
1318 &quot;A String&quot;,
1319 ],
1320 &quot;inputBytes&quot;: &quot;A String&quot;, # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
1321 },
1322 &quot;endTime&quot;: &quot;A String&quot;, # [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.
1323 &quot;completionRatio&quot;: 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -&gt; 1.0) for LOAD and EXTRACT jobs.
1324 &quot;startTime&quot;: &quot;A String&quot;, # [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.
1325 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
1326 &quot;scriptStatistics&quot;: { # [Output-only] Statistics for a child job of a script.
1327 &quot;evaluationKind&quot;: &quot;A String&quot;, # [Output-only] Whether this child job was a statement or expression.
1328 &quot;stackFrames&quot;: [ # 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.
1329 {
1330 &quot;procedureId&quot;: &quot;A String&quot;, # [Output-only] Name of the active procedure, empty if in a top-level script.
1331 &quot;startLine&quot;: 42, # [Output-only] One-based start line.
1332 &quot;text&quot;: &quot;A String&quot;, # [Output-only] Text of the current statement/expression.
1333 &quot;endColumn&quot;: 42, # [Output-only] One-based end column.
1334 &quot;endLine&quot;: 42, # [Output-only] One-based end line.
1335 &quot;startColumn&quot;: 42, # [Output-only] One-based start column.
1336 },
1337 ],
1338 },
1339 &quot;query&quot;: { # [Output-only] Statistics for a query job.
1340 &quot;timeline&quot;: [ # [Output-only] [Beta] Describes a timeline of job execution.
1341 {
1342 &quot;activeUnits&quot;: &quot;A String&quot;, # 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.
1343 &quot;completedUnits&quot;: &quot;A String&quot;, # Total parallel units of work completed by this query.
1344 &quot;elapsedMs&quot;: &quot;A String&quot;, # Milliseconds elapsed since the start of query execution.
1345 &quot;pendingUnits&quot;: &quot;A String&quot;, # Total parallel units of work remaining for the active stages.
1346 &quot;totalSlotMs&quot;: &quot;A String&quot;, # Cumulative slot-ms consumed by the query.
1347 },
1348 ],
1349 &quot;ddlTargetRoutine&quot;: { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
1350 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
1351 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
1352 &quot;routineId&quot;: &quot;A String&quot;, # [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.
1353 },
1354 &quot;queryPlan&quot;: [ # [Output-only] Describes execution plan for the query.
1355 {
1356 &quot;steps&quot;: [ # List of operations within the stage in dependency order (approximately chronological).
1357 {
1358 &quot;substeps&quot;: [ # Human-readable stage descriptions.
1359 &quot;A String&quot;,
1360 ],
1361 &quot;kind&quot;: &quot;A String&quot;, # Machine-readable operation type.
1362 },
1363 ],
1364 &quot;startMs&quot;: &quot;A String&quot;, # Stage start time represented as milliseconds since epoch.
1365 &quot;writeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on writing output.
1366 &quot;shuffleOutputBytesSpilled&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle and spilled to disk.
1367 &quot;readMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent reading input.
1368 &quot;waitMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent waiting to be scheduled.
1369 &quot;recordsRead&quot;: &quot;A String&quot;, # Number of records read into the stage.
1370 &quot;writeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on writing output.
1371 &quot;waitRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
1372 &quot;waitMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent waiting to be scheduled.
1373 &quot;writeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on writing output.
1374 &quot;computeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
1375 &quot;completedParallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments completed.
1376 &quot;recordsWritten&quot;: &quot;A String&quot;, # Number of records written by the stage.
1377 &quot;waitRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
1378 &quot;readRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent reading input.
1379 &quot;readRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent reading input.
1380 &quot;id&quot;: &quot;A String&quot;, # Unique ID for stage within plan.
1381 &quot;writeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on writing output.
1382 &quot;endMs&quot;: &quot;A String&quot;, # Stage end time represented as milliseconds since epoch.
1383 &quot;inputStages&quot;: [ # IDs for stages that are inputs to this stage.
1384 &quot;A String&quot;,
1385 ],
1386 &quot;computeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on CPU-bound tasks.
1387 &quot;computeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on CPU-bound tasks.
1388 &quot;slotMs&quot;: &quot;A String&quot;, # Slot-milliseconds used by the stage.
1389 &quot;readMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent reading input.
1390 &quot;shuffleOutputBytes&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle.
1391 &quot;parallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments to be processed.
1392 &quot;status&quot;: &quot;A String&quot;, # Current status for the stage.
1393 &quot;name&quot;: &quot;A String&quot;, # Human-readable name for stage.
1394 &quot;computeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
1395 },
1396 ],
1397 &quot;ddlTargetTable&quot;: { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
1398 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1399 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1400 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1401 },
1402 &quot;schema&quot;: { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
1403 &quot;fields&quot;: [ # Describes the fields in a table.
1404 {
1405 &quot;name&quot;: &quot;A String&quot;, # [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.
1406 &quot;type&quot;: &quot;A String&quot;, # [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).
1407 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1408 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1409 &quot;A String&quot;,
1410 ],
1411 },
1412 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1413 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1414 &quot;policyTags&quot;: {
1415 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1416 &quot;A String&quot;,
1417 ],
1418 },
1419 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1420 # Object with schema name: TableFieldSchema
1421 ],
1422 },
1423 ],
1424 },
1425 &quot;estimatedBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] The original estimate of bytes processed for the job.
1426 &quot;referencedTables&quot;: [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
1427 {
1428 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1429 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1430 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1431 },
1432 ],
1433 &quot;modelTrainingCurrentIteration&quot;: 42, # [Output-only, Beta] Deprecated; do not use.
1434 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1435 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] Total bytes processed for the job.
1436 &quot;statementType&quot;: &quot;A String&quot;, # The type of query statement, if valid. Possible values (new values might be added in the future): &quot;SELECT&quot;: SELECT query. &quot;INSERT&quot;: INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;UPDATE&quot;: UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;DELETE&quot;: DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;MERGE&quot;: MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;ALTER_TABLE&quot;: ALTER TABLE query. &quot;ALTER_VIEW&quot;: ALTER VIEW query. &quot;ASSERT&quot;: ASSERT condition AS &#x27;description&#x27;. &quot;CREATE_FUNCTION&quot;: CREATE FUNCTION query. &quot;CREATE_MODEL&quot;: CREATE [OR REPLACE] MODEL ... AS SELECT ... . &quot;CREATE_PROCEDURE&quot;: CREATE PROCEDURE query. &quot;CREATE_TABLE&quot;: CREATE [OR REPLACE] TABLE without AS SELECT. &quot;CREATE_TABLE_AS_SELECT&quot;: CREATE [OR REPLACE] TABLE ... AS SELECT ... . &quot;CREATE_VIEW&quot;: CREATE [OR REPLACE] VIEW ... AS SELECT ... . &quot;DROP_FUNCTION&quot; : DROP FUNCTION query. &quot;DROP_PROCEDURE&quot;: DROP PROCEDURE query. &quot;DROP_TABLE&quot;: DROP TABLE query. &quot;DROP_VIEW&quot;: DROP VIEW query.
1437 &quot;ddlOperationPerformed&quot;: &quot;A String&quot;, # The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): &quot;CREATE&quot;: The query created the DDL target. &quot;SKIP&quot;: 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. &quot;REPLACE&quot;: The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. &quot;DROP&quot;: The query deleted the DDL target.
1438 &quot;billingTier&quot;: 42, # [Output-only] Billing tier for the job.
1439 &quot;ddlTargetRowAccessPolicy&quot;: { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
1440 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this row access policy.
1441 &quot;policyId&quot;: &quot;A String&quot;, # [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.
1442 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table containing this row access policy.
1443 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this row access policy.
1444 },
1445 &quot;modelTraining&quot;: { # [Output-only, Beta] Information about create model query job progress.
1446 &quot;expectedTotalIterations&quot;: &quot;A String&quot;, # [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.
1447 &quot;currentIteration&quot;: 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
1448 },
1449 &quot;cacheHit&quot;: True or False, # [Output-only] Whether the query result was fetched from the query cache.
1450 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
1451 {
1452 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
1453 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
1454 },
1455 ],
1456 &quot;undeclaredQueryParameters&quot;: [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation.
1457 {
1458 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
1459 &quot;parameterType&quot;: { # [Required] The type of this parameter.
1460 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
1461 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
1462 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
1463 {
1464 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
1465 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
1466 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
1467 },
1468 ],
1469 },
1470 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
1471 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
1472 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
1473 },
1474 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
1475 # Object with schema name: QueryParameterValue
1476 ],
1477 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
1478 },
1479 },
1480 ],
1481 &quot;totalPartitionsProcessed&quot;: &quot;A String&quot;, # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
1482 &quot;modelTrainingExpectedTotalIteration&quot;: &quot;A String&quot;, # [Output-only, Beta] Deprecated; do not use.
1483 &quot;ddlAffectedRowAccessPolicyCount&quot;: &quot;A String&quot;, # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
1484 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
1485 &quot;totalBytesBilled&quot;: &quot;A String&quot;, # [Output-only] Total bytes billed for the job.
1486 &quot;totalBytesProcessedAccuracy&quot;: &quot;A String&quot;, # [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.
1487 &quot;referencedRoutines&quot;: [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
1488 {
1489 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
1490 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
1491 &quot;routineId&quot;: &quot;A String&quot;, # [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.
1492 },
1493 ],
1494 },
1495 &quot;numChildJobs&quot;: &quot;A String&quot;, # [Output-only] Number of child jobs executed.
1496 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
1497 &quot;parentJobId&quot;: &quot;A String&quot;, # [Output-only] If this is a child job, the id of the parent.
1498 &quot;reservation_id&quot;: &quot;A String&quot;, # [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.
1499 &quot;quotaDeferments&quot;: [ # [Output-only] Quotas which delayed this job&#x27;s start time.
1500 &quot;A String&quot;,
1501 ],
1502 &quot;rowLevelSecurityStatistics&quot;: { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
1503 &quot;rowLevelSecurityApplied&quot;: True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies.
1504 },
1505 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
1506 {
1507 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
1508 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
1509 },
1510 ],
1511 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
1512 &quot;load&quot;: { # [Output-only] Statistics for a load job.
1513 &quot;badRecords&quot;: &quot;A String&quot;, # [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.
1514 &quot;inputFileBytes&quot;: &quot;A String&quot;, # [Output-only] Number of bytes of source data in a load job.
1515 &quot;inputFiles&quot;: &quot;A String&quot;, # [Output-only] Number of source files in a load job.
1516 &quot;outputRows&quot;: &quot;A String&quot;, # [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.
1517 &quot;outputBytes&quot;: &quot;A String&quot;, # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
1518 },
1519 },
1520 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1521 &quot;id&quot;: &quot;A String&quot;, # [Output-only] Opaque ID field of the job
1522 &quot;configuration&quot;: { # [Required] Describes the job configuration.
1523 &quot;copy&quot;: { # [Pick one] Copies a table.
1524 &quot;destinationTable&quot;: { # [Required] The destination table
1525 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1526 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1527 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1528 },
1529 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1530 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
1531 },
1532 &quot;sourceTables&quot;: [ # [Pick one] Source tables to copy.
1533 {
1534 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1535 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1536 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1537 },
1538 ],
1539 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
1540 &quot;sourceTable&quot;: { # [Pick one] Source table to copy.
1541 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1542 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1543 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1544 },
1545 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
1546 },
1547 &quot;jobTimeoutMs&quot;: &quot;A String&quot;, # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
1548 &quot;query&quot;: { # [Pick one] Configures a query job.
1549 &quot;queryParameters&quot;: [ # Query parameters for standard SQL queries.
1550 {
1551 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
1552 &quot;parameterType&quot;: { # [Required] The type of this parameter.
1553 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
1554 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
1555 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
1556 {
1557 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
1558 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
1559 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
1560 },
1561 ],
1562 },
1563 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
1564 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
1565 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
1566 },
1567 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
1568 # Object with schema name: QueryParameterValue
1569 ],
1570 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
1571 },
1572 },
1573 ],
1574 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
1575 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1576 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
1577 },
1578 &quot;clustering&quot;: { # [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.
1579 &quot;fields&quot;: [ # [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.
1580 &quot;A String&quot;,
1581 ],
1582 },
1583 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
1584 &quot;maximumBytesBilled&quot;: &quot;A String&quot;, # [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.
1585 &quot;schemaUpdateOptions&quot;: [ # 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.
1586 &quot;A String&quot;,
1587 ],
1588 &quot;priority&quot;: &quot;A String&quot;, # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
1589 &quot;connectionProperties&quot;: [ # Connection properties.
1590 {
1591 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
1592 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
1593 },
1594 ],
1595 &quot;allowLargeResults&quot;: 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.
1596 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1597 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1598 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1599 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1600 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
1601 },
1602 &quot;field&quot;: &quot;A String&quot;, # [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.
1603 },
1604 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
1605 &quot;useQueryCache&quot;: 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.
1606 &quot;flattenResults&quot;: 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.
1607 &quot;tableDefinitions&quot;: { # [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.
1608 &quot;a_key&quot;: {
1609 &quot;compression&quot;: &quot;A String&quot;, # [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.
1610 &quot;maxBadRecords&quot;: 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.
1611 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1612 &quot;A String&quot;,
1613 ],
1614 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1615 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1616 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1617 &quot;allowJaggedRows&quot;: 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.
1618 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1619 &quot;encoding&quot;: &quot;A String&quot;, # [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.
1620 &quot;allowQuotedNewlines&quot;: 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.
1621 },
1622 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1623 &quot;readRowkeyAsString&quot;: 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.
1624 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
1625 {
1626 &quot;onlyReadLatest&quot;: 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 &#x27;columns&#x27; and specifying a different setting for that column.
1627 &quot;encoding&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying an encoding for it.
1628 &quot;columns&quot;: [ # [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.
1629 {
1630 &quot;fieldName&quot;: &quot;A String&quot;, # [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.
1631 &quot;qualifierString&quot;: &quot;A String&quot;,
1632 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1633 &quot;type&quot;: &quot;A String&quot;, # [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. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1634 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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.
1635 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1636 },
1637 ],
1638 &quot;type&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying a type for it.
1639 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1640 },
1641 ],
1642 &quot;ignoreUnspecifiedColumnFamilies&quot;: 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.
1643 },
1644 &quot;schema&quot;: { # [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.
1645 &quot;fields&quot;: [ # Describes the fields in a table.
1646 {
1647 &quot;name&quot;: &quot;A String&quot;, # [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.
1648 &quot;type&quot;: &quot;A String&quot;, # [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).
1649 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1650 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1651 &quot;A String&quot;,
1652 ],
1653 },
1654 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1655 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1656 &quot;policyTags&quot;: {
1657 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1658 &quot;A String&quot;,
1659 ],
1660 },
1661 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1662 # Object with schema name: TableFieldSchema
1663 ],
1664 },
1665 ],
1666 },
1667 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
1668 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1669 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1670 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1671 },
1672 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1673 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1674 &quot;range&quot;: &quot;A String&quot;, # [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
1675 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1676 },
1677 &quot;ignoreUnknownValues&quot;: 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&#x27;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.
1678 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1679 },
1680 },
1681 &quot;defaultDataset&quot;: { # [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.
1682 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
1683 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
1684 },
1685 &quot;maximumBillingTier&quot;: 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.
1686 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
1687 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1688 &quot;requirePartitionFilter&quot;: True or False,
1689 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
1690 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
1691 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1692 },
1693 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
1694 &quot;query&quot;: &quot;A String&quot;, # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
1695 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1696 { # 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
1697 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
1698 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1699 },
1700 ],
1701 &quot;destinationTable&quot;: { # [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.
1702 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1703 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1704 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1705 },
1706 },
1707 &quot;dryRun&quot;: True or False, # [Optional] If set, don&#x27;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&#x27;t a dry run. Behavior of non-query jobs is undefined.
1708 &quot;load&quot;: { # [Pick one] Configures a load job.
1709 &quot;nullMarker&quot;: &quot;A String&quot;, # [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify &quot;\N&quot;, BigQuery interprets &quot;\N&quot; 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.
1710 &quot;schema&quot;: { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you&#x27;re loading data from Google Cloud Datastore.
1711 &quot;fields&quot;: [ # Describes the fields in a table.
1712 {
1713 &quot;name&quot;: &quot;A String&quot;, # [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.
1714 &quot;type&quot;: &quot;A String&quot;, # [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).
1715 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1716 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1717 &quot;A String&quot;,
1718 ],
1719 },
1720 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1721 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1722 &quot;policyTags&quot;: {
1723 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1724 &quot;A String&quot;,
1725 ],
1726 },
1727 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1728 # Object with schema name: TableFieldSchema
1729 ],
1730 },
1731 ],
1732 },
1733 &quot;schemaInlineFormat&quot;: &quot;A String&quot;, # [Deprecated] The format of the schemaInline property.
1734 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1735 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
1736 &quot;destinationTableProperties&quot;: { # [Beta] [Optional] Properties with which to create the destination table if it is new.
1737 &quot;labels&quot;: { # [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.
1738 &quot;a_key&quot;: &quot;A String&quot;,
1739 },
1740 &quot;friendlyName&quot;: &quot;A String&quot;, # [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.
1741 &quot;description&quot;: &quot;A String&quot;, # [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.
1742 },
1743 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Optional] The format of the data files. For CSV files, specify &quot;CSV&quot;. For datastore backups, specify &quot;DATASTORE_BACKUP&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro, specify &quot;AVRO&quot;. For parquet, specify &quot;PARQUET&quot;. For orc, specify &quot;ORC&quot;. The default value is CSV.
1744 &quot;ignoreUnknownValues&quot;: 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&#x27;t match any column names
1745 &quot;destinationTable&quot;: { # [Required] The destination table to load the data into.
1746 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1747 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1748 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1749 },
1750 &quot;encoding&quot;: &quot;A String&quot;, # [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.
1751 &quot;clustering&quot;: { # [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.
1752 &quot;fields&quot;: [ # [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.
1753 &quot;A String&quot;,
1754 ],
1755 },
1756 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
1757 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1758 &quot;A String&quot;,
1759 ],
1760 &quot;maxBadRecords&quot;: 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.
1761 &quot;allowJaggedRows&quot;: 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.
1762 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1763 &quot;projectionFields&quot;: [ # If sourceFormat is set to &quot;DATASTORE_BACKUP&quot;, 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&#x27;t found in the Cloud Datastore backup, an invalid error is returned in the job result.
1764 &quot;A String&quot;,
1765 ],
1766 &quot;allowQuotedNewlines&quot;: True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1767 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1768 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1769 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1770 },
1771 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If sourceFormat is set to &quot;AVRO&quot;, indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
1772 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1773 &quot;requirePartitionFilter&quot;: True or False,
1774 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
1775 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
1776 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1777 },
1778 &quot;skipLeadingRows&quot;: 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.
1779 &quot;autodetect&quot;: True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
1780 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1781 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
1782 },
1783 &quot;schemaUpdateOptions&quot;: [ # 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.
1784 &quot;A String&quot;,
1785 ],
1786 &quot;schemaInline&quot;: &quot;A String&quot;, # [Deprecated] The inline schema. For CSV schemas, specify as &quot;Field1:Type1[,Field2:Type2]*&quot;. For example, &quot;foo:STRING, bar:INTEGER, baz:FLOAT&quot;.
1787 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1788 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1789 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1790 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1791 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
1792 },
1793 &quot;field&quot;: &quot;A String&quot;, # [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.
1794 },
1795 },
1796 &quot;labels&quot;: { # 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.
1797 &quot;a_key&quot;: &quot;A String&quot;,
1798 },
1799 &quot;jobType&quot;: &quot;A String&quot;, # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
1800 &quot;extract&quot;: { # [Pick one] Configures an extract job.
1801 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] Delimiter to use between fields in the exported data. Default is &#x27;,&#x27;. Not applicable when extracting models.
1802 &quot;destinationUri&quot;: &quot;A String&quot;, # [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.
1803 &quot;printHeader&quot;: true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
1804 &quot;compression&quot;: &quot;A String&quot;, # [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.
1805 &quot;destinationUris&quot;: [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
1806 &quot;A String&quot;,
1807 ],
1808 &quot;destinationFormat&quot;: &quot;A String&quot;, # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON 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.
1809 &quot;sourceModel&quot;: { # A reference to the model being exported.
1810 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
1811 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
1812 &quot;modelId&quot;: &quot;A String&quot;, # [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.
1813 },
1814 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If destinationFormat is set to &quot;AVRO&quot;, 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.
1815 &quot;sourceTable&quot;: { # A reference to the table being exported.
1816 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1817 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1818 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1819 },
1820 },
1821 },
1822 &quot;user_email&quot;: &quot;A String&quot;, # [Output-only] Email address of the user who ran the job.
1823 &quot;kind&quot;: &quot;bigquery#job&quot;, # [Output-only] The type of the resource.
1824 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of this resource.
1825 &quot;jobReference&quot;: { # [Optional] Reference describing the unique-per-user name of the job.
1826 &quot;jobId&quot;: &quot;A String&quot;, # [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.
1827 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
1828 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
1829 },
1830}
1831
1832 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
1833 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
1834
1835Returns:
1836 An object of the form:
1837
1838 {
1839 &quot;status&quot;: { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
1840 &quot;errors&quot;: [ # [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.
1841 {
1842 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
1843 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
1844 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
1845 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
1846 },
1847 ],
1848 &quot;state&quot;: &quot;A String&quot;, # [Output-only] Running state of the job.
1849 &quot;errorResult&quot;: { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
1850 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
1851 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
1852 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
1853 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
1854 },
1855 },
1856 &quot;statistics&quot;: { # [Output-only] Information about the job, including starting time and ending time of the job.
1857 &quot;extract&quot;: { # [Output-only] Statistics for an extract job.
1858 &quot;destinationUriFileCounts&quot;: [ # [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 &#x27;destinationUris&#x27; field.
1859 &quot;A String&quot;,
1860 ],
1861 &quot;inputBytes&quot;: &quot;A String&quot;, # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
1862 },
1863 &quot;endTime&quot;: &quot;A String&quot;, # [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.
1864 &quot;completionRatio&quot;: 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -&gt; 1.0) for LOAD and EXTRACT jobs.
1865 &quot;startTime&quot;: &quot;A String&quot;, # [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.
1866 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
1867 &quot;scriptStatistics&quot;: { # [Output-only] Statistics for a child job of a script.
1868 &quot;evaluationKind&quot;: &quot;A String&quot;, # [Output-only] Whether this child job was a statement or expression.
1869 &quot;stackFrames&quot;: [ # 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.
1870 {
1871 &quot;procedureId&quot;: &quot;A String&quot;, # [Output-only] Name of the active procedure, empty if in a top-level script.
1872 &quot;startLine&quot;: 42, # [Output-only] One-based start line.
1873 &quot;text&quot;: &quot;A String&quot;, # [Output-only] Text of the current statement/expression.
1874 &quot;endColumn&quot;: 42, # [Output-only] One-based end column.
1875 &quot;endLine&quot;: 42, # [Output-only] One-based end line.
1876 &quot;startColumn&quot;: 42, # [Output-only] One-based start column.
1877 },
1878 ],
1879 },
1880 &quot;query&quot;: { # [Output-only] Statistics for a query job.
1881 &quot;timeline&quot;: [ # [Output-only] [Beta] Describes a timeline of job execution.
1882 {
1883 &quot;activeUnits&quot;: &quot;A String&quot;, # 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.
1884 &quot;completedUnits&quot;: &quot;A String&quot;, # Total parallel units of work completed by this query.
1885 &quot;elapsedMs&quot;: &quot;A String&quot;, # Milliseconds elapsed since the start of query execution.
1886 &quot;pendingUnits&quot;: &quot;A String&quot;, # Total parallel units of work remaining for the active stages.
1887 &quot;totalSlotMs&quot;: &quot;A String&quot;, # Cumulative slot-ms consumed by the query.
1888 },
1889 ],
1890 &quot;ddlTargetRoutine&quot;: { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
1891 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
1892 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
1893 &quot;routineId&quot;: &quot;A String&quot;, # [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.
1894 },
1895 &quot;queryPlan&quot;: [ # [Output-only] Describes execution plan for the query.
1896 {
1897 &quot;steps&quot;: [ # List of operations within the stage in dependency order (approximately chronological).
1898 {
1899 &quot;substeps&quot;: [ # Human-readable stage descriptions.
1900 &quot;A String&quot;,
1901 ],
1902 &quot;kind&quot;: &quot;A String&quot;, # Machine-readable operation type.
1903 },
1904 ],
1905 &quot;startMs&quot;: &quot;A String&quot;, # Stage start time represented as milliseconds since epoch.
1906 &quot;writeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on writing output.
1907 &quot;shuffleOutputBytesSpilled&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle and spilled to disk.
1908 &quot;readMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent reading input.
1909 &quot;waitMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent waiting to be scheduled.
1910 &quot;recordsRead&quot;: &quot;A String&quot;, # Number of records read into the stage.
1911 &quot;writeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on writing output.
1912 &quot;waitRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
1913 &quot;waitMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent waiting to be scheduled.
1914 &quot;writeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on writing output.
1915 &quot;computeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
1916 &quot;completedParallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments completed.
1917 &quot;recordsWritten&quot;: &quot;A String&quot;, # Number of records written by the stage.
1918 &quot;waitRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
1919 &quot;readRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent reading input.
1920 &quot;readRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent reading input.
1921 &quot;id&quot;: &quot;A String&quot;, # Unique ID for stage within plan.
1922 &quot;writeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on writing output.
1923 &quot;endMs&quot;: &quot;A String&quot;, # Stage end time represented as milliseconds since epoch.
1924 &quot;inputStages&quot;: [ # IDs for stages that are inputs to this stage.
1925 &quot;A String&quot;,
1926 ],
1927 &quot;computeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on CPU-bound tasks.
1928 &quot;computeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on CPU-bound tasks.
1929 &quot;slotMs&quot;: &quot;A String&quot;, # Slot-milliseconds used by the stage.
1930 &quot;readMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent reading input.
1931 &quot;shuffleOutputBytes&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle.
1932 &quot;parallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments to be processed.
1933 &quot;status&quot;: &quot;A String&quot;, # Current status for the stage.
1934 &quot;name&quot;: &quot;A String&quot;, # Human-readable name for stage.
1935 &quot;computeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
1936 },
1937 ],
1938 &quot;ddlTargetTable&quot;: { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
1939 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1940 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1941 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1942 },
1943 &quot;schema&quot;: { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
1944 &quot;fields&quot;: [ # Describes the fields in a table.
1945 {
1946 &quot;name&quot;: &quot;A String&quot;, # [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.
1947 &quot;type&quot;: &quot;A String&quot;, # [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).
1948 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1949 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1950 &quot;A String&quot;,
1951 ],
1952 },
1953 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1954 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1955 &quot;policyTags&quot;: {
1956 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1957 &quot;A String&quot;,
1958 ],
1959 },
1960 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1961 # Object with schema name: TableFieldSchema
1962 ],
1963 },
1964 ],
1965 },
1966 &quot;estimatedBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] The original estimate of bytes processed for the job.
1967 &quot;referencedTables&quot;: [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
1968 {
1969 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1970 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1971 &quot;tableId&quot;: &quot;A String&quot;, # [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.
1972 },
1973 ],
1974 &quot;modelTrainingCurrentIteration&quot;: 42, # [Output-only, Beta] Deprecated; do not use.
1975 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1976 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] Total bytes processed for the job.
1977 &quot;statementType&quot;: &quot;A String&quot;, # The type of query statement, if valid. Possible values (new values might be added in the future): &quot;SELECT&quot;: SELECT query. &quot;INSERT&quot;: INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;UPDATE&quot;: UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;DELETE&quot;: DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;MERGE&quot;: MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;ALTER_TABLE&quot;: ALTER TABLE query. &quot;ALTER_VIEW&quot;: ALTER VIEW query. &quot;ASSERT&quot;: ASSERT condition AS &#x27;description&#x27;. &quot;CREATE_FUNCTION&quot;: CREATE FUNCTION query. &quot;CREATE_MODEL&quot;: CREATE [OR REPLACE] MODEL ... AS SELECT ... . &quot;CREATE_PROCEDURE&quot;: CREATE PROCEDURE query. &quot;CREATE_TABLE&quot;: CREATE [OR REPLACE] TABLE without AS SELECT. &quot;CREATE_TABLE_AS_SELECT&quot;: CREATE [OR REPLACE] TABLE ... AS SELECT ... . &quot;CREATE_VIEW&quot;: CREATE [OR REPLACE] VIEW ... AS SELECT ... . &quot;DROP_FUNCTION&quot; : DROP FUNCTION query. &quot;DROP_PROCEDURE&quot;: DROP PROCEDURE query. &quot;DROP_TABLE&quot;: DROP TABLE query. &quot;DROP_VIEW&quot;: DROP VIEW query.
1978 &quot;ddlOperationPerformed&quot;: &quot;A String&quot;, # The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): &quot;CREATE&quot;: The query created the DDL target. &quot;SKIP&quot;: 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. &quot;REPLACE&quot;: The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. &quot;DROP&quot;: The query deleted the DDL target.
1979 &quot;billingTier&quot;: 42, # [Output-only] Billing tier for the job.
1980 &quot;ddlTargetRowAccessPolicy&quot;: { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
1981 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this row access policy.
1982 &quot;policyId&quot;: &quot;A String&quot;, # [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.
1983 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table containing this row access policy.
1984 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this row access policy.
1985 },
1986 &quot;modelTraining&quot;: { # [Output-only, Beta] Information about create model query job progress.
1987 &quot;expectedTotalIterations&quot;: &quot;A String&quot;, # [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.
1988 &quot;currentIteration&quot;: 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
1989 },
1990 &quot;cacheHit&quot;: True or False, # [Output-only] Whether the query result was fetched from the query cache.
1991 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
1992 {
1993 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
1994 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
1995 },
1996 ],
1997 &quot;undeclaredQueryParameters&quot;: [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation.
1998 {
1999 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2000 &quot;parameterType&quot;: { # [Required] The type of this parameter.
2001 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
2002 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
2003 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
2004 {
2005 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
2006 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
2007 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
2008 },
2009 ],
2010 },
2011 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
2012 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
2013 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
2014 },
2015 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
2016 # Object with schema name: QueryParameterValue
2017 ],
2018 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
2019 },
2020 },
2021 ],
2022 &quot;totalPartitionsProcessed&quot;: &quot;A String&quot;, # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
2023 &quot;modelTrainingExpectedTotalIteration&quot;: &quot;A String&quot;, # [Output-only, Beta] Deprecated; do not use.
2024 &quot;ddlAffectedRowAccessPolicyCount&quot;: &quot;A String&quot;, # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
2025 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
2026 &quot;totalBytesBilled&quot;: &quot;A String&quot;, # [Output-only] Total bytes billed for the job.
2027 &quot;totalBytesProcessedAccuracy&quot;: &quot;A String&quot;, # [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.
2028 &quot;referencedRoutines&quot;: [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
2029 {
2030 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
2031 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
2032 &quot;routineId&quot;: &quot;A String&quot;, # [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.
2033 },
2034 ],
2035 },
2036 &quot;numChildJobs&quot;: &quot;A String&quot;, # [Output-only] Number of child jobs executed.
2037 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
2038 &quot;parentJobId&quot;: &quot;A String&quot;, # [Output-only] If this is a child job, the id of the parent.
2039 &quot;reservation_id&quot;: &quot;A String&quot;, # [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.
2040 &quot;quotaDeferments&quot;: [ # [Output-only] Quotas which delayed this job&#x27;s start time.
2041 &quot;A String&quot;,
2042 ],
2043 &quot;rowLevelSecurityStatistics&quot;: { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
2044 &quot;rowLevelSecurityApplied&quot;: True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies.
2045 },
2046 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
2047 {
2048 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
2049 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
2050 },
2051 ],
2052 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
2053 &quot;load&quot;: { # [Output-only] Statistics for a load job.
2054 &quot;badRecords&quot;: &quot;A String&quot;, # [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.
2055 &quot;inputFileBytes&quot;: &quot;A String&quot;, # [Output-only] Number of bytes of source data in a load job.
2056 &quot;inputFiles&quot;: &quot;A String&quot;, # [Output-only] Number of source files in a load job.
2057 &quot;outputRows&quot;: &quot;A String&quot;, # [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.
2058 &quot;outputBytes&quot;: &quot;A String&quot;, # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
2059 },
2060 },
2061 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
2062 &quot;id&quot;: &quot;A String&quot;, # [Output-only] Opaque ID field of the job
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 &quot;configuration&quot;: { # [Required] Describes the job configuration.
2064 &quot;copy&quot;: { # [Pick one] Copies a table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002065 &quot;destinationTable&quot;: { # [Required] The destination table
Bu Sun Kim65020912020-05-20 12:08:20 -07002066 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2067 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002068 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002069 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002070 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2071 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
2072 },
2073 &quot;sourceTables&quot;: [ # [Pick one] Source tables to copy.
Dan O'Mearadd494642020-05-01 07:42:23 -07002074 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002075 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2076 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002077 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002078 },
2079 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002080 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002081 &quot;sourceTable&quot;: { # [Pick one] Source table to copy.
2082 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2083 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2084 &quot;tableId&quot;: &quot;A String&quot;, # [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.
2085 },
2086 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002087 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002088 &quot;jobTimeoutMs&quot;: &quot;A String&quot;, # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
2089 &quot;query&quot;: { # [Pick one] Configures a query job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002090 &quot;queryParameters&quot;: [ # Query parameters for standard SQL queries.
2091 {
2092 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2093 &quot;parameterType&quot;: { # [Required] The type of this parameter.
2094 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
2095 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
2096 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
2097 {
2098 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
2099 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
2100 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
2101 },
2102 ],
2103 },
2104 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
2105 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
2106 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
2107 },
2108 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
2109 # Object with schema name: QueryParameterValue
2110 ],
2111 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
2112 },
2113 },
2114 ],
2115 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
2116 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2117 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
2118 },
2119 &quot;clustering&quot;: { # [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.
2120 &quot;fields&quot;: [ # [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.
2121 &quot;A String&quot;,
2122 ],
2123 },
2124 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002125 &quot;maximumBytesBilled&quot;: &quot;A String&quot;, # [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.
2126 &quot;schemaUpdateOptions&quot;: [ # 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.
2127 &quot;A String&quot;,
2128 ],
2129 &quot;priority&quot;: &quot;A String&quot;, # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
2130 &quot;connectionProperties&quot;: [ # Connection properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002131 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002132 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
2133 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
2134 },
2135 ],
2136 &quot;allowLargeResults&quot;: 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.
2137 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2138 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2139 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2140 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2141 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2142 },
2143 &quot;field&quot;: &quot;A String&quot;, # [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.
2144 },
2145 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
2146 &quot;useQueryCache&quot;: 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.
2147 &quot;flattenResults&quot;: 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.
2148 &quot;tableDefinitions&quot;: { # [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.
2149 &quot;a_key&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002150 &quot;compression&quot;: &quot;A String&quot;, # [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.
2151 &quot;maxBadRecords&quot;: 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.
2152 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
2153 &quot;A String&quot;,
2154 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002155 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
Bu Sun Kim65020912020-05-20 12:08:20 -07002156 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
2157 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
2158 &quot;allowJaggedRows&quot;: 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.
2159 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002160 &quot;encoding&quot;: &quot;A String&quot;, # [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.
2161 &quot;allowQuotedNewlines&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002162 },
2163 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002164 &quot;readRowkeyAsString&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002165 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002166 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002167 &quot;onlyReadLatest&quot;: 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 &#x27;columns&#x27; and specifying a different setting for that column.
2168 &quot;encoding&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying an encoding for it.
2169 &quot;columns&quot;: [ # [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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002170 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002171 &quot;fieldName&quot;: &quot;A String&quot;, # [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.
2172 &quot;qualifierString&quot;: &quot;A String&quot;,
2173 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
2174 &quot;type&quot;: &quot;A String&quot;, # [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. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002175 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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.
2176 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002177 },
2178 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002179 &quot;type&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying a type for it.
2180 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002181 },
2182 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002183 &quot;ignoreUnspecifiedColumnFamilies&quot;: 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002184 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002185 &quot;schema&quot;: { # [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.
2186 &quot;fields&quot;: [ # Describes the fields in a table.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002187 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002188 &quot;name&quot;: &quot;A String&quot;, # [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.
2189 &quot;type&quot;: &quot;A String&quot;, # [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).
2190 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2191 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
2192 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002193 ],
2194 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2196 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2197 &quot;policyTags&quot;: {
2198 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
2199 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002200 ],
2201 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002202 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2203 # Object with schema name: TableFieldSchema
2204 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002205 },
2206 ],
2207 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002208 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
Bu Sun Kim65020912020-05-20 12:08:20 -07002209 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2210 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2211 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2212 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002213 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
2214 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
2215 &quot;range&quot;: &quot;A String&quot;, # [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
2216 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
2217 },
2218 &quot;ignoreUnknownValues&quot;: 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&#x27;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.
2219 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002220 },
2221 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002222 &quot;defaultDataset&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002223 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002224 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Bu Sun Kim65020912020-05-20 12:08:20 -07002225 },
2226 &quot;maximumBillingTier&quot;: 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.
2227 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
2228 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002229 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07002230 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
2231 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
2232 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Bu Sun Kim65020912020-05-20 12:08:20 -07002233 },
2234 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
2235 &quot;query&quot;: &quot;A String&quot;, # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
2236 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002237 { # 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
Bu Sun Kim65020912020-05-20 12:08:20 -07002238 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002239 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002240 },
2241 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002242 &quot;destinationTable&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002243 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2244 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002245 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002246 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 },
2248 &quot;dryRun&quot;: True or False, # [Optional] If set, don&#x27;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&#x27;t a dry run. Behavior of non-query jobs is undefined.
Bu Sun Kim65020912020-05-20 12:08:20 -07002249 &quot;load&quot;: { # [Pick one] Configures a load job.
Bu Sun Kim65020912020-05-20 12:08:20 -07002250 &quot;nullMarker&quot;: &quot;A String&quot;, # [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify &quot;\N&quot;, BigQuery interprets &quot;\N&quot; 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.
2251 &quot;schema&quot;: { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you&#x27;re loading data from Google Cloud Datastore.
2252 &quot;fields&quot;: [ # Describes the fields in a table.
2253 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002254 &quot;name&quot;: &quot;A String&quot;, # [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.
2255 &quot;type&quot;: &quot;A String&quot;, # [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).
2256 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2257 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
2258 &quot;A String&quot;,
2259 ],
2260 },
2261 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2262 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2263 &quot;policyTags&quot;: {
2264 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
2265 &quot;A String&quot;,
2266 ],
2267 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002268 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2269 # Object with schema name: TableFieldSchema
2270 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002271 },
2272 ],
2273 },
2274 &quot;schemaInlineFormat&quot;: &quot;A String&quot;, # [Deprecated] The format of the schemaInline property.
2275 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
2276 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
2277 &quot;destinationTableProperties&quot;: { # [Beta] [Optional] Properties with which to create the destination table if it is new.
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;labels&quot;: { # [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.
2279 &quot;a_key&quot;: &quot;A String&quot;,
2280 },
2281 &quot;friendlyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002282 &quot;description&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002284 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Optional] The format of the data files. For CSV files, specify &quot;CSV&quot;. For datastore backups, specify &quot;DATASTORE_BACKUP&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro, specify &quot;AVRO&quot;. For parquet, specify &quot;PARQUET&quot;. For orc, specify &quot;ORC&quot;. The default value is CSV.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002285 &quot;ignoreUnknownValues&quot;: 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&#x27;t match any column names
Bu Sun Kim65020912020-05-20 12:08:20 -07002286 &quot;destinationTable&quot;: { # [Required] The destination table to load the data into.
Bu Sun Kim65020912020-05-20 12:08:20 -07002287 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2288 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002289 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002290 },
2291 &quot;encoding&quot;: &quot;A String&quot;, # [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.
2292 &quot;clustering&quot;: { # [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.
2293 &quot;fields&quot;: [ # [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.
2294 &quot;A String&quot;,
2295 ],
2296 },
2297 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
2298 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
2299 &quot;A String&quot;,
2300 ],
2301 &quot;maxBadRecords&quot;: 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.
2302 &quot;allowJaggedRows&quot;: 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.
2303 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
2304 &quot;projectionFields&quot;: [ # If sourceFormat is set to &quot;DATASTORE_BACKUP&quot;, 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&#x27;t found in the Cloud Datastore backup, an invalid error is returned in the job result.
2305 &quot;A String&quot;,
2306 ],
2307 &quot;allowQuotedNewlines&quot;: True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
2308 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2309 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2310 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2311 },
2312 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If sourceFormat is set to &quot;AVRO&quot;, indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
Bu Sun Kim65020912020-05-20 12:08:20 -07002313 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002314 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07002315 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
2316 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
2317 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002318 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002319 &quot;skipLeadingRows&quot;: 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.
2320 &quot;autodetect&quot;: True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
2321 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2322 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
2323 },
2324 &quot;schemaUpdateOptions&quot;: [ # 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.
2325 &quot;A String&quot;,
2326 ],
2327 &quot;schemaInline&quot;: &quot;A String&quot;, # [Deprecated] The inline schema. For CSV schemas, specify as &quot;Field1:Type1[,Field2:Type2]*&quot;. For example, &quot;foo:STRING, bar:INTEGER, baz:FLOAT&quot;.
2328 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2329 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2330 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2331 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2332 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2333 },
2334 &quot;field&quot;: &quot;A String&quot;, # [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.
2335 },
2336 },
2337 &quot;labels&quot;: { # 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.
2338 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002339 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002340 &quot;jobType&quot;: &quot;A String&quot;, # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
2341 &quot;extract&quot;: { # [Pick one] Configures an extract job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002342 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] Delimiter to use between fields in the exported data. Default is &#x27;,&#x27;. Not applicable when extracting models.
2343 &quot;destinationUri&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002344 &quot;printHeader&quot;: true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
2345 &quot;compression&quot;: &quot;A String&quot;, # [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.
2346 &quot;destinationUris&quot;: [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
2347 &quot;A String&quot;,
2348 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002349 &quot;destinationFormat&quot;: &quot;A String&quot;, # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002350 &quot;sourceModel&quot;: { # A reference to the model being exported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002351 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -07002352 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
2353 &quot;modelId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002354 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002355 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If destinationFormat is set to &quot;AVRO&quot;, 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.
2356 &quot;sourceTable&quot;: { # A reference to the table being exported.
2357 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2358 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2359 &quot;tableId&quot;: &quot;A String&quot;, # [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.
2360 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002361 },
John Asmuth614db982014-04-24 15:46:26 -04002362 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002363 &quot;user_email&quot;: &quot;A String&quot;, # [Output-only] Email address of the user who ran the job.
2364 &quot;kind&quot;: &quot;bigquery#job&quot;, # [Output-only] The type of the resource.
2365 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of this resource.
2366 &quot;jobReference&quot;: { # [Optional] Reference describing the unique-per-user name of the job.
2367 &quot;jobId&quot;: &quot;A String&quot;, # [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.
2368 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
2369 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
2370 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002371 }</pre>
John Asmuth614db982014-04-24 15:46:26 -04002372</div>
2373
2374<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002375 <code class="details" id="list">list(projectId, stateFilter=None, projection=None, minCreationTime=None, parentJobId=None, allUsers=None, pageToken=None, maxCreationTime=None, maxResults=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07002376 <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.
John Asmuth614db982014-04-24 15:46:26 -04002377
2378Args:
2379 projectId: string, Project ID of the jobs to list (required)
John Asmuth614db982014-04-24 15:46:26 -04002380 stateFilter: string, Filter for job state (repeated)
2381 Allowed values
2382 done - Finished jobs
2383 pending - Pending jobs
2384 running - Running jobs
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002385 projection: string, Restrict information returned to a set of selected fields
2386 Allowed values
2387 full - Includes all job data
2388 minimal - Does not include the job configuration
Bu Sun Kim65020912020-05-20 12:08:20 -07002389 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
2390 parentJobId: string, If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent
2391 allUsers: boolean, Whether to display jobs owned by all users in the project. Default false
2392 pageToken: string, Page token, returned by a previous call, to request the next page of results
2393 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
2394 maxResults: integer, Maximum number of results to return
John Asmuth614db982014-04-24 15:46:26 -04002395
2396Returns:
2397 An object of the form:
2398
2399 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002400 &quot;jobs&quot;: [ # List of jobs that were requested.
John Asmuth614db982014-04-24 15:46:26 -04002401 {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002402 &quot;id&quot;: &quot;A String&quot;, # Unique opaque ID of the job.
2403 &quot;configuration&quot;: { # [Full-projection-only] Specifies the job configuration.
2404 &quot;copy&quot;: { # [Pick one] Copies a table.
2405 &quot;destinationTable&quot;: { # [Required] The destination table
2406 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2407 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2408 &quot;tableId&quot;: &quot;A String&quot;, # [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.
John Asmuth614db982014-04-24 15:46:26 -04002409 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002410 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2411 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002412 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002413 &quot;sourceTables&quot;: [ # [Pick one] Source tables to copy.
Dan O'Mearadd494642020-05-01 07:42:23 -07002414 {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002415 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2416 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2417 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002418 },
2419 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002420 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
2421 &quot;sourceTable&quot;: { # [Pick one] Source table to copy.
2422 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2423 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2424 &quot;tableId&quot;: &quot;A String&quot;, # [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.
2425 },
2426 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
2427 },
2428 &quot;jobTimeoutMs&quot;: &quot;A String&quot;, # [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
2429 &quot;query&quot;: { # [Pick one] Configures a query job.
2430 &quot;queryParameters&quot;: [ # Query parameters for standard SQL queries.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002431 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002432 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2433 &quot;parameterType&quot;: { # [Required] The type of this parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002434 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
Bu Sun Kim65020912020-05-20 12:08:20 -07002435 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
2436 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002437 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002438 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
2439 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
2440 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002441 },
2442 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002443 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002444 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
2445 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
2446 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002447 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002448 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002449 # Object with schema name: QueryParameterValue
2450 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002451 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002452 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002453 },
2454 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002455 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002456 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2457 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002458 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002459 &quot;clustering&quot;: { # [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.
2460 &quot;fields&quot;: [ # [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.
2461 &quot;A String&quot;,
2462 ],
2463 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002464 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002465 &quot;maximumBytesBilled&quot;: &quot;A String&quot;, # [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.
2466 &quot;schemaUpdateOptions&quot;: [ # 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.
2467 &quot;A String&quot;,
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07002468 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002469 &quot;priority&quot;: &quot;A String&quot;, # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
2470 &quot;connectionProperties&quot;: [ # Connection properties.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07002471 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002472 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
2473 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
2474 },
2475 ],
2476 &quot;allowLargeResults&quot;: 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.
2477 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2478 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2479 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2480 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2481 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2482 },
2483 &quot;field&quot;: &quot;A String&quot;, # [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.
2484 },
2485 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
2486 &quot;useQueryCache&quot;: 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.
2487 &quot;flattenResults&quot;: 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.
2488 &quot;tableDefinitions&quot;: { # [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.
2489 &quot;a_key&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002490 &quot;compression&quot;: &quot;A String&quot;, # [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.
2491 &quot;maxBadRecords&quot;: 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.
2492 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
2493 &quot;A String&quot;,
2494 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002495 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
Bu Sun Kim65020912020-05-20 12:08:20 -07002496 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
2497 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
2498 &quot;allowJaggedRows&quot;: 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.
2499 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002500 &quot;encoding&quot;: &quot;A String&quot;, # [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.
2501 &quot;allowQuotedNewlines&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 },
2503 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002504 &quot;readRowkeyAsString&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002505 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07002506 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002507 &quot;onlyReadLatest&quot;: 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 &#x27;columns&#x27; and specifying a different setting for that column.
2508 &quot;encoding&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying an encoding for it.
2509 &quot;columns&quot;: [ # [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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002510 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002511 &quot;fieldName&quot;: &quot;A String&quot;, # [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.
2512 &quot;qualifierString&quot;: &quot;A String&quot;,
2513 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
2514 &quot;type&quot;: &quot;A String&quot;, # [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. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002515 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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.
2516 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002517 },
2518 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002519 &quot;type&quot;: &quot;A String&quot;, # [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 &#x27;columns&#x27; and specifying a type for it.
2520 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002521 },
2522 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002523 &quot;ignoreUnspecifiedColumnFamilies&quot;: 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002524 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002525 &quot;schema&quot;: { # [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.
2526 &quot;fields&quot;: [ # Describes the fields in a table.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002527 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002528 &quot;name&quot;: &quot;A String&quot;, # [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.
2529 &quot;type&quot;: &quot;A String&quot;, # [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).
2530 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2531 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
2532 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002533 ],
2534 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002535 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2536 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2537 &quot;policyTags&quot;: {
2538 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
2539 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002540 ],
2541 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002542 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2543 # Object with schema name: TableFieldSchema
2544 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002545 },
2546 ],
2547 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002548 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
Bu Sun Kim65020912020-05-20 12:08:20 -07002549 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2550 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2551 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2552 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002553 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
2554 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
2555 &quot;range&quot;: &quot;A String&quot;, # [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
2556 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
2557 },
2558 &quot;ignoreUnknownValues&quot;: 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&#x27;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.
2559 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002560 },
2561 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002562 &quot;defaultDataset&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002563 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002564 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Bu Sun Kim65020912020-05-20 12:08:20 -07002565 },
2566 &quot;maximumBillingTier&quot;: 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.
2567 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
2568 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002569 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07002570 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
2571 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
2572 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Bu Sun Kim65020912020-05-20 12:08:20 -07002573 },
2574 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
2575 &quot;query&quot;: &quot;A String&quot;, # [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
2576 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002577 { # 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
Bu Sun Kim65020912020-05-20 12:08:20 -07002578 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002579 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002580 },
2581 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002582 &quot;destinationTable&quot;: { # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002583 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2584 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002585 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002586 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002587 },
2588 &quot;dryRun&quot;: True or False, # [Optional] If set, don&#x27;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&#x27;t a dry run. Behavior of non-query jobs is undefined.
Bu Sun Kim65020912020-05-20 12:08:20 -07002589 &quot;load&quot;: { # [Pick one] Configures a load job.
Bu Sun Kim65020912020-05-20 12:08:20 -07002590 &quot;nullMarker&quot;: &quot;A String&quot;, # [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify &quot;\N&quot;, BigQuery interprets &quot;\N&quot; 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.
2591 &quot;schema&quot;: { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you&#x27;re loading data from Google Cloud Datastore.
2592 &quot;fields&quot;: [ # Describes the fields in a table.
2593 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002594 &quot;name&quot;: &quot;A String&quot;, # [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.
2595 &quot;type&quot;: &quot;A String&quot;, # [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).
2596 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2597 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
2598 &quot;A String&quot;,
2599 ],
2600 },
2601 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2602 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2603 &quot;policyTags&quot;: {
2604 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
2605 &quot;A String&quot;,
2606 ],
2607 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002608 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2609 # Object with schema name: TableFieldSchema
2610 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002611 },
2612 ],
2613 },
2614 &quot;schemaInlineFormat&quot;: &quot;A String&quot;, # [Deprecated] The format of the schemaInline property.
2615 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
2616 &quot;writeDisposition&quot;: &quot;A String&quot;, # [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 &#x27;duplicate&#x27; 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.
2617 &quot;destinationTableProperties&quot;: { # [Beta] [Optional] Properties with which to create the destination table if it is new.
Bu Sun Kim65020912020-05-20 12:08:20 -07002618 &quot;labels&quot;: { # [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.
2619 &quot;a_key&quot;: &quot;A String&quot;,
2620 },
2621 &quot;friendlyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002622 &quot;description&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002623 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002624 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Optional] The format of the data files. For CSV files, specify &quot;CSV&quot;. For datastore backups, specify &quot;DATASTORE_BACKUP&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro, specify &quot;AVRO&quot;. For parquet, specify &quot;PARQUET&quot;. For orc, specify &quot;ORC&quot;. The default value is CSV.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002625 &quot;ignoreUnknownValues&quot;: 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&#x27;t match any column names
Bu Sun Kim65020912020-05-20 12:08:20 -07002626 &quot;destinationTable&quot;: { # [Required] The destination table to load the data into.
Bu Sun Kim65020912020-05-20 12:08:20 -07002627 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2628 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002629 &quot;tableId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002630 },
2631 &quot;encoding&quot;: &quot;A String&quot;, # [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.
2632 &quot;clustering&quot;: { # [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.
2633 &quot;fields&quot;: [ # [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.
2634 &quot;A String&quot;,
2635 ],
2636 },
2637 &quot;createDisposition&quot;: &quot;A String&quot;, # [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 &#x27;notFound&#x27; 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.
2638 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
2639 &quot;A String&quot;,
2640 ],
2641 &quot;maxBadRecords&quot;: 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.
2642 &quot;allowJaggedRows&quot;: 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.
2643 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [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 &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
2644 &quot;projectionFields&quot;: [ # If sourceFormat is set to &quot;DATASTORE_BACKUP&quot;, 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&#x27;t found in the Cloud Datastore backup, an invalid error is returned in the job result.
2645 &quot;A String&quot;,
2646 ],
2647 &quot;allowQuotedNewlines&quot;: True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
2648 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2649 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2650 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2651 },
2652 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If sourceFormat is set to &quot;AVRO&quot;, indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
Bu Sun Kim65020912020-05-20 12:08:20 -07002653 &quot;timePartitioning&quot;: { # Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002654 &quot;requirePartitionFilter&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07002655 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; 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.
2656 &quot;expirationMs&quot;: &quot;A String&quot;, # [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.
2657 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002658 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002659 &quot;skipLeadingRows&quot;: 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.
2660 &quot;autodetect&quot;: True or False, # [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
2661 &quot;destinationEncryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2662 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
2663 },
2664 &quot;schemaUpdateOptions&quot;: [ # 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.
2665 &quot;A String&quot;,
2666 ],
2667 &quot;schemaInline&quot;: &quot;A String&quot;, # [Deprecated] The inline schema. For CSV schemas, specify as &quot;Field1:Type1[,Field2:Type2]*&quot;. For example, &quot;foo:STRING, bar:INTEGER, baz:FLOAT&quot;.
2668 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2669 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2670 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2671 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2672 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2673 },
2674 &quot;field&quot;: &quot;A String&quot;, # [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.
2675 },
2676 },
2677 &quot;labels&quot;: { # 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.
2678 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002679 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002680 &quot;jobType&quot;: &quot;A String&quot;, # [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
2681 &quot;extract&quot;: { # [Pick one] Configures an extract job.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002682 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] Delimiter to use between fields in the exported data. Default is &#x27;,&#x27;. Not applicable when extracting models.
2683 &quot;destinationUri&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002684 &quot;printHeader&quot;: true, # [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
2685 &quot;compression&quot;: &quot;A String&quot;, # [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.
2686 &quot;destinationUris&quot;: [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
2687 &quot;A String&quot;,
2688 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002689 &quot;destinationFormat&quot;: &quot;A String&quot;, # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002690 &quot;sourceModel&quot;: { # A reference to the model being exported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002691 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this model.
Bu Sun Kim65020912020-05-20 12:08:20 -07002692 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this model.
2693 &quot;modelId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002694 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002695 &quot;useAvroLogicalTypes&quot;: True or False, # [Optional] If destinationFormat is set to &quot;AVRO&quot;, 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 &quot;sourceTable&quot;: { # A reference to the table being exported.
2697 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2698 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2699 &quot;tableId&quot;: &quot;A String&quot;, # [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.
2700 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002701 },
John Asmuth614db982014-04-24 15:46:26 -04002702 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002703 &quot;user_email&quot;: &quot;A String&quot;, # [Full-projection-only] Email address of the user who ran the job.
2704 &quot;errorResult&quot;: { # A result object that will be present only if the job has failed.
2705 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
2706 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
2707 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
2708 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
2709 },
2710 &quot;kind&quot;: &quot;bigquery#job&quot;, # The resource type.
2711 &quot;jobReference&quot;: { # Job reference uniquely identifying the job.
2712 &quot;jobId&quot;: &quot;A String&quot;, # [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.
2713 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
2714 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
Dan O'Mearadd494642020-05-01 07:42:23 -07002715 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002716 &quot;status&quot;: { # [Full-projection-only] Describes the state of the job.
2717 &quot;errors&quot;: [ # [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.
2718 {
2719 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
2720 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
2721 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
2722 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
2723 },
2724 ],
2725 &quot;state&quot;: &quot;A String&quot;, # [Output-only] Running state of the job.
2726 &quot;errorResult&quot;: { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
2727 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
2728 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
2729 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
2730 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
2731 },
2732 },
2733 &quot;state&quot;: &quot;A String&quot;, # Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
2734 &quot;statistics&quot;: { # [Output-only] Information about the job, including starting time and ending time of the job.
2735 &quot;extract&quot;: { # [Output-only] Statistics for an extract job.
2736 &quot;destinationUriFileCounts&quot;: [ # [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 &#x27;destinationUris&#x27; field.
2737 &quot;A String&quot;,
2738 ],
2739 &quot;inputBytes&quot;: &quot;A String&quot;, # [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
2740 },
2741 &quot;endTime&quot;: &quot;A String&quot;, # [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.
2742 &quot;completionRatio&quot;: 3.14, # [TrustedTester] [Output-only] Job progress (0.0 -&gt; 1.0) for LOAD and EXTRACT jobs.
2743 &quot;startTime&quot;: &quot;A String&quot;, # [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.
2744 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
2745 &quot;scriptStatistics&quot;: { # [Output-only] Statistics for a child job of a script.
2746 &quot;evaluationKind&quot;: &quot;A String&quot;, # [Output-only] Whether this child job was a statement or expression.
2747 &quot;stackFrames&quot;: [ # 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.
2748 {
2749 &quot;procedureId&quot;: &quot;A String&quot;, # [Output-only] Name of the active procedure, empty if in a top-level script.
2750 &quot;startLine&quot;: 42, # [Output-only] One-based start line.
2751 &quot;text&quot;: &quot;A String&quot;, # [Output-only] Text of the current statement/expression.
2752 &quot;endColumn&quot;: 42, # [Output-only] One-based end column.
2753 &quot;endLine&quot;: 42, # [Output-only] One-based end line.
2754 &quot;startColumn&quot;: 42, # [Output-only] One-based start column.
2755 },
2756 ],
2757 },
2758 &quot;query&quot;: { # [Output-only] Statistics for a query job.
2759 &quot;timeline&quot;: [ # [Output-only] [Beta] Describes a timeline of job execution.
2760 {
2761 &quot;activeUnits&quot;: &quot;A String&quot;, # 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.
2762 &quot;completedUnits&quot;: &quot;A String&quot;, # Total parallel units of work completed by this query.
2763 &quot;elapsedMs&quot;: &quot;A String&quot;, # Milliseconds elapsed since the start of query execution.
2764 &quot;pendingUnits&quot;: &quot;A String&quot;, # Total parallel units of work remaining for the active stages.
2765 &quot;totalSlotMs&quot;: &quot;A String&quot;, # Cumulative slot-ms consumed by the query.
2766 },
2767 ],
2768 &quot;ddlTargetRoutine&quot;: { # The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
2769 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
2770 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
2771 &quot;routineId&quot;: &quot;A String&quot;, # [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.
2772 },
2773 &quot;queryPlan&quot;: [ # [Output-only] Describes execution plan for the query.
2774 {
2775 &quot;steps&quot;: [ # List of operations within the stage in dependency order (approximately chronological).
2776 {
2777 &quot;substeps&quot;: [ # Human-readable stage descriptions.
2778 &quot;A String&quot;,
2779 ],
2780 &quot;kind&quot;: &quot;A String&quot;, # Machine-readable operation type.
2781 },
2782 ],
2783 &quot;startMs&quot;: &quot;A String&quot;, # Stage start time represented as milliseconds since epoch.
2784 &quot;writeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on writing output.
2785 &quot;shuffleOutputBytesSpilled&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle and spilled to disk.
2786 &quot;readMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent reading input.
2787 &quot;waitMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent waiting to be scheduled.
2788 &quot;recordsRead&quot;: &quot;A String&quot;, # Number of records read into the stage.
2789 &quot;writeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on writing output.
2790 &quot;waitRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
2791 &quot;waitMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent waiting to be scheduled.
2792 &quot;writeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on writing output.
2793 &quot;computeRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
2794 &quot;completedParallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments completed.
2795 &quot;recordsWritten&quot;: &quot;A String&quot;, # Number of records written by the stage.
2796 &quot;waitRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
2797 &quot;readRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent reading input.
2798 &quot;readRatioAvg&quot;: 3.14, # Relative amount of time the average shard spent reading input.
2799 &quot;id&quot;: &quot;A String&quot;, # Unique ID for stage within plan.
2800 &quot;writeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on writing output.
2801 &quot;endMs&quot;: &quot;A String&quot;, # Stage end time represented as milliseconds since epoch.
2802 &quot;inputStages&quot;: [ # IDs for stages that are inputs to this stage.
2803 &quot;A String&quot;,
2804 ],
2805 &quot;computeMsAvg&quot;: &quot;A String&quot;, # Milliseconds the average shard spent on CPU-bound tasks.
2806 &quot;computeMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent on CPU-bound tasks.
2807 &quot;slotMs&quot;: &quot;A String&quot;, # Slot-milliseconds used by the stage.
2808 &quot;readMsMax&quot;: &quot;A String&quot;, # Milliseconds the slowest shard spent reading input.
2809 &quot;shuffleOutputBytes&quot;: &quot;A String&quot;, # Total number of bytes written to shuffle.
2810 &quot;parallelInputs&quot;: &quot;A String&quot;, # Number of parallel input segments to be processed.
2811 &quot;status&quot;: &quot;A String&quot;, # Current status for the stage.
2812 &quot;name&quot;: &quot;A String&quot;, # Human-readable name for stage.
2813 &quot;computeRatioMax&quot;: 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
2814 },
2815 ],
2816 &quot;ddlTargetTable&quot;: { # [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
2817 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2818 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2819 &quot;tableId&quot;: &quot;A String&quot;, # [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 },
2821 &quot;schema&quot;: { # [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
2822 &quot;fields&quot;: [ # Describes the fields in a table.
2823 {
2824 &quot;name&quot;: &quot;A String&quot;, # [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.
2825 &quot;type&quot;: &quot;A String&quot;, # [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).
2826 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2827 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
2828 &quot;A String&quot;,
2829 ],
2830 },
2831 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2832 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2833 &quot;policyTags&quot;: {
2834 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
2835 &quot;A String&quot;,
2836 ],
2837 },
2838 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2839 # Object with schema name: TableFieldSchema
2840 ],
2841 },
2842 ],
2843 },
2844 &quot;estimatedBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] The original estimate of bytes processed for the job.
2845 &quot;referencedTables&quot;: [ # [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
2846 {
2847 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2848 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2849 &quot;tableId&quot;: &quot;A String&quot;, # [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.
2850 },
2851 ],
2852 &quot;modelTrainingCurrentIteration&quot;: 42, # [Output-only, Beta] Deprecated; do not use.
2853 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
2854 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # [Output-only] Total bytes processed for the job.
2855 &quot;statementType&quot;: &quot;A String&quot;, # The type of query statement, if valid. Possible values (new values might be added in the future): &quot;SELECT&quot;: SELECT query. &quot;INSERT&quot;: INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;UPDATE&quot;: UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;DELETE&quot;: DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;MERGE&quot;: MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. &quot;ALTER_TABLE&quot;: ALTER TABLE query. &quot;ALTER_VIEW&quot;: ALTER VIEW query. &quot;ASSERT&quot;: ASSERT condition AS &#x27;description&#x27;. &quot;CREATE_FUNCTION&quot;: CREATE FUNCTION query. &quot;CREATE_MODEL&quot;: CREATE [OR REPLACE] MODEL ... AS SELECT ... . &quot;CREATE_PROCEDURE&quot;: CREATE PROCEDURE query. &quot;CREATE_TABLE&quot;: CREATE [OR REPLACE] TABLE without AS SELECT. &quot;CREATE_TABLE_AS_SELECT&quot;: CREATE [OR REPLACE] TABLE ... AS SELECT ... . &quot;CREATE_VIEW&quot;: CREATE [OR REPLACE] VIEW ... AS SELECT ... . &quot;DROP_FUNCTION&quot; : DROP FUNCTION query. &quot;DROP_PROCEDURE&quot;: DROP PROCEDURE query. &quot;DROP_TABLE&quot;: DROP TABLE query. &quot;DROP_VIEW&quot;: DROP VIEW query.
2856 &quot;ddlOperationPerformed&quot;: &quot;A String&quot;, # The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): &quot;CREATE&quot;: The query created the DDL target. &quot;SKIP&quot;: 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. &quot;REPLACE&quot;: The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. &quot;DROP&quot;: The query deleted the DDL target.
2857 &quot;billingTier&quot;: 42, # [Output-only] Billing tier for the job.
2858 &quot;ddlTargetRowAccessPolicy&quot;: { # [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
2859 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this row access policy.
2860 &quot;policyId&quot;: &quot;A String&quot;, # [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.
2861 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table containing this row access policy.
2862 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this row access policy.
2863 },
2864 &quot;modelTraining&quot;: { # [Output-only, Beta] Information about create model query job progress.
2865 &quot;expectedTotalIterations&quot;: &quot;A String&quot;, # [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.
2866 &quot;currentIteration&quot;: 42, # [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
2867 },
2868 &quot;cacheHit&quot;: True or False, # [Output-only] Whether the query result was fetched from the query cache.
2869 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
2870 {
2871 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
2872 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
2873 },
2874 ],
2875 &quot;undeclaredQueryParameters&quot;: [ # Standard SQL only: list of undeclared query parameters detected during a dry run validation.
2876 {
2877 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2878 &quot;parameterType&quot;: { # [Required] The type of this parameter.
2879 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
2880 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
2881 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
2882 {
2883 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
2884 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
2885 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
2886 },
2887 ],
2888 },
2889 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
2890 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
2891 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
2892 },
2893 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
2894 # Object with schema name: QueryParameterValue
2895 ],
2896 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
2897 },
2898 },
2899 ],
2900 &quot;totalPartitionsProcessed&quot;: &quot;A String&quot;, # [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
2901 &quot;modelTrainingExpectedTotalIteration&quot;: &quot;A String&quot;, # [Output-only, Beta] Deprecated; do not use.
2902 &quot;ddlAffectedRowAccessPolicyCount&quot;: &quot;A String&quot;, # [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
2903 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
2904 &quot;totalBytesBilled&quot;: &quot;A String&quot;, # [Output-only] Total bytes billed for the job.
2905 &quot;totalBytesProcessedAccuracy&quot;: &quot;A String&quot;, # [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.
2906 &quot;referencedRoutines&quot;: [ # [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
2907 {
2908 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
2909 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
2910 &quot;routineId&quot;: &quot;A String&quot;, # [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.
2911 },
2912 ],
2913 },
2914 &quot;numChildJobs&quot;: &quot;A String&quot;, # [Output-only] Number of child jobs executed.
2915 &quot;totalSlotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds for the job.
2916 &quot;parentJobId&quot;: &quot;A String&quot;, # [Output-only] If this is a child job, the id of the parent.
2917 &quot;reservation_id&quot;: &quot;A String&quot;, # [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.
2918 &quot;quotaDeferments&quot;: [ # [Output-only] Quotas which delayed this job&#x27;s start time.
2919 &quot;A String&quot;,
2920 ],
2921 &quot;rowLevelSecurityStatistics&quot;: { # [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
2922 &quot;rowLevelSecurityApplied&quot;: True or False, # [Output-only] [Preview] Whether any accessed data was protected by row access policies.
2923 },
2924 &quot;reservationUsage&quot;: [ # [Output-only] Job resource usage breakdown by reservation.
2925 {
2926 &quot;slotMs&quot;: &quot;A String&quot;, # [Output-only] Slot-milliseconds the job spent in the given reservation.
2927 &quot;name&quot;: &quot;A String&quot;, # [Output-only] Reservation name or &quot;unreserved&quot; for on-demand resources usage.
2928 },
2929 ],
2930 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
2931 &quot;load&quot;: { # [Output-only] Statistics for a load job.
2932 &quot;badRecords&quot;: &quot;A String&quot;, # [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.
2933 &quot;inputFileBytes&quot;: &quot;A String&quot;, # [Output-only] Number of bytes of source data in a load job.
2934 &quot;inputFiles&quot;: &quot;A String&quot;, # [Output-only] Number of source files in a load job.
2935 &quot;outputRows&quot;: &quot;A String&quot;, # [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.
2936 &quot;outputBytes&quot;: &quot;A String&quot;, # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
2937 },
2938 },
John Asmuth614db982014-04-24 15:46:26 -04002939 },
2940 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002941 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
2942 &quot;kind&quot;: &quot;bigquery#jobList&quot;, # The resource type of the response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002943 &quot;etag&quot;: &quot;A String&quot;, # A hash of this page of results.
John Asmuth614db982014-04-24 15:46:26 -04002944 }</pre>
2945</div>
2946
2947<div class="method">
2948 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2949 <pre>Retrieves the next page of results.
2950
2951Args:
2952 previous_request: The request for the previous page. (required)
2953 previous_response: The response from the request for the previous page. (required)
2954
2955Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002956 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002957 page. Returns None if there are no more items in the collection.
2958 </pre>
2959</div>
2960
2961<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002962 <code class="details" id="query">query(projectId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002963 <pre>Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
2964
2965Args:
2966 projectId: string, Project ID of the project billed for the query (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002967 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002968 The object takes the form of:
2969
2970{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002971 &quot;connectionProperties&quot;: [ # Connection properties.
2972 {
2973 &quot;key&quot;: &quot;A String&quot;, # [Required] Name of the connection property to set.
2974 &quot;value&quot;: &quot;A String&quot;, # [Required] Value of the connection property.
2975 },
2976 ],
2977 &quot;timeoutMs&quot;: 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 &#x27;jobComplete&#x27; 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).
2978 &quot;kind&quot;: &quot;bigquery#queryRequest&quot;, # The resource type of the request.
2979 &quot;parameterMode&quot;: &quot;A String&quot;, # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
Bu Sun Kim65020912020-05-20 12:08:20 -07002980 &quot;useQueryCache&quot;: 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.
2981 &quot;defaultDataset&quot;: { # [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 &#x27;datasetId.tableId&#x27;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002982 &quot;datasetId&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002983 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
John Asmuth614db982014-04-24 15:46:26 -04002984 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002985 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
2986 &quot;preserveNulls&quot;: True or False, # [Deprecated] This property is deprecated.
2987 &quot;maxResults&quot;: 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.
2988 &quot;query&quot;: &quot;A String&quot;, # [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: &quot;SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]&quot;.
2989 &quot;dryRun&quot;: True or False, # [Optional] If set to true, BigQuery doesn&#x27;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.
2990 &quot;queryParameters&quot;: [ # Query parameters for Standard SQL queries.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07002991 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002992 &quot;name&quot;: &quot;A String&quot;, # [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2993 &quot;parameterType&quot;: { # [Required] The type of this parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002994 &quot;arrayType&quot;: # Object with schema name: QueryParameterType # [Optional] The type of the array&#x27;s elements, if this is an array.
Bu Sun Kim65020912020-05-20 12:08:20 -07002995 &quot;type&quot;: &quot;A String&quot;, # [Required] The top level type of this field.
2996 &quot;structTypes&quot;: [ # [Optional] The types of the fields of this struct, in order, if this is a struct.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07002997 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002998 &quot;name&quot;: &quot;A String&quot;, # [Optional] The name of this field.
2999 &quot;description&quot;: &quot;A String&quot;, # [Optional] Human-oriented description of the field.
3000 &quot;type&quot;: # Object with schema name: QueryParameterType # [Required] The type of this field.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07003001 },
3002 ],
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07003003 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003004 &quot;parameterValue&quot;: { # [Required] The value of this parameter.
3005 &quot;structValues&quot;: { # [Optional] The struct field values, in order of the struct type&#x27;s declaration.
3006 &quot;a_key&quot;: # Object with schema name: QueryParameterValue
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07003007 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003008 &quot;arrayValues&quot;: [ # [Optional] The array values, if this is an array type.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07003009 # Object with schema name: QueryParameterValue
3010 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003011 &quot;value&quot;: &quot;A String&quot;, # [Optional] The value of this value, if a simple scalar type.
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07003012 },
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07003013 },
3014 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003015 &quot;useLegacySql&quot;: true, # Specifies whether to use BigQuery&#x27;s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery&#x27;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.
John Asmuth614db982014-04-24 15:46:26 -04003016 }
3017
3018
3019Returns:
3020 An object of the form:
3021
3022 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003023 &quot;rows&quot;: [ # 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 Matsuo06694102015-09-11 13:55:40 -07003024 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003025 &quot;f&quot;: [ # Represents a single row in the result set, consisting of one or more fields.
Takashi Matsuo06694102015-09-11 13:55:40 -07003026 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003027 &quot;v&quot;: &quot;&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07003028 },
3029 ],
3030 },
3031 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003032 &quot;errors&quot;: [ # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003033 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003034 &quot;reason&quot;: &quot;A String&quot;, # A short error code that summarizes the error.
3035 &quot;message&quot;: &quot;A String&quot;, # A human-readable description of the error.
3036 &quot;location&quot;: &quot;A String&quot;, # Specifies where the error occurred, if present.
3037 &quot;debugInfo&quot;: &quot;A String&quot;, # Debugging information. This property is internal to Google and should not be used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003038 },
3039 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003040 &quot;pageToken&quot;: &quot;A String&quot;, # A token used for paging results.
3041 &quot;kind&quot;: &quot;bigquery#queryResponse&quot;, # The resource type.
3042 &quot;jobComplete&quot;: 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.
3043 &quot;numDmlAffectedRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
3044 &quot;totalBytesProcessed&quot;: &quot;A String&quot;, # 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.
3045 &quot;totalRows&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003046 &quot;jobReference&quot;: { # 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).
3047 &quot;jobId&quot;: &quot;A String&quot;, # [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.
3048 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this job.
3049 &quot;location&quot;: &quot;A String&quot;, # The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
3050 },
3051 &quot;cacheHit&quot;: True or False, # Whether the query result was fetched from the query cache.
3052 &quot;schema&quot;: { # The schema of the results. Present only when the query completes successfully.
3053 &quot;fields&quot;: [ # Describes the fields in a table.
3054 {
3055 &quot;name&quot;: &quot;A String&quot;, # [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.
3056 &quot;type&quot;: &quot;A String&quot;, # [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).
3057 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
3058 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
3059 &quot;A String&quot;,
3060 ],
3061 },
3062 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
3063 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
3064 &quot;policyTags&quot;: {
3065 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
3066 &quot;A String&quot;,
3067 ],
3068 },
3069 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
3070 # Object with schema name: TableFieldSchema
3071 ],
3072 },
3073 ],
3074 },
John Asmuth614db982014-04-24 15:46:26 -04003075 }</pre>
3076</div>
3077
3078</body></html>