blob: 034182763e95a22fafb856a0e92e3e455de0f6f8 [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">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000078 <code><a href="#cancel">cancel(projectId, jobId)</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">
John Asmuth614db982014-04-24 15:46:26 -040081 <code><a href="#get">get(projectId, jobId)</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">
84 <code><a href="#getQueryResults">getQueryResults(projectId, jobId, timeoutMs=None, pageToken=None, maxResults=None, startIndex=None)</a></code></p>
85<p class="firstline">Retrieves the results of a query job.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(projectId, body=None, media_body=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000088<p class="firstline">Starts a new asynchronous job. Requires the Can View project role.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#list">list(projectId, projection=None, stateFilter=None, pageToken=None, allUsers=None, maxResults=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070091<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 -040092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#query">query(projectId, body)</a></code></p>
97<p class="firstline">Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.</p>
98<h3>Method Details</h3>
99<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000100 <code class="details" id="cancel">cancel(projectId, jobId)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101 <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 +0000102
103Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104 projectId: string, [Required] Project ID of the job to cancel (required)
105 jobId: string, [Required] Job ID of the job to cancel (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000106
107Returns:
108 An object of the form:
109
110 {
111 "job": { # The final state of the job.
112 "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
113 "state": "A String", # [Output-only] Running state of the job.
114 "errors": [ # [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
115 {
116 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
117 "message": "A String", # A human-readable description of the error.
118 "reason": "A String", # A short error code that summarizes the error.
119 "location": "A String", # Specifies where the error occurred, if present.
120 },
121 ],
122 "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
123 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
124 "message": "A String", # A human-readable description of the error.
125 "reason": "A String", # A short error code that summarizes the error.
126 "location": "A String", # Specifies where the error occurred, if present.
127 },
128 },
129 "kind": "bigquery#job", # [Output-only] The type of the resource.
130 "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job.
131 "load": { # [Output-only] Statistics for a load job.
132 "outputRows": "A String", # [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
133 "inputFiles": "A String", # [Output-only] Number of source files in a load job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700134 "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job.
135 "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000136 },
137 "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
138 "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
139 "startTime": "A String", # [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
140 "query": { # [Output-only] Statistics for a query job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "queryPlan": [ # [Output-only, Experimental] Describes execution plan for the query as a list of stages.
142 {
143 "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
144 "recordsWritten": "A String", # Number of records written by the stage.
145 "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
146 "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input.
147 "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input.
148 "steps": [ # List of operations within the stage in dependency order (approximately chronological).
149 {
150 "kind": "A String", # Machine-readable operation type.
151 "substeps": [ # Human-readable stage descriptions.
152 "A String",
153 ],
154 },
155 ],
156 "recordsRead": "A String", # Number of records read into the stage.
157 "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
158 "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output.
159 "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output.
160 "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
161 "id": "A String", # Unique ID for stage within plan.
162 "name": "A String", # Human-readable name for stage.
163 },
164 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700165 "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job.
166 "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800167 "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache.
168 "billingTier": 42, # [Output-only] Billing tier for the job.
169 "referencedTables": [ # [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
170 {
171 "projectId": "A String", # [Required] The ID of the project containing this table.
172 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
173 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
174 },
175 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000176 },
177 "endTime": "A String", # [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
178 "extract": { # [Output-only] Statistics for an extract job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 "destinationUriFileCounts": [ # [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000180 "A String",
181 ],
182 },
183 },
184 "jobReference": { # [Optional] Reference describing the unique-per-user name of the job.
185 "projectId": "A String", # [Required] The ID of the project containing this job.
186 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
187 },
188 "etag": "A String", # [Output-only] A hash of this resource.
189 "user_email": "A String", # [Output-only] Email address of the user who ran the job.
190 "configuration": { # [Required] Describes the job configuration.
191 "load": { # [Pick one] Configures a load job.
192 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000194 "sourceFormat": "A String", # [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
195 "destinationTable": { # [Required] The destination table to load the data into.
196 "projectId": "A String", # [Required] The ID of the project containing this table.
197 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
198 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
199 },
200 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
201 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
202 "allowJaggedRows": True or False, # [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
203 "skipLeadingRows": 42, # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
204 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
205 "A String",
206 ],
207 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
208 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
209 "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property.
210 "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
211 "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
212 "projectionFields": [ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
213 "A String",
214 ],
215 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800216 "schema": { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000217 "fields": [ # Describes the fields in a table.
218 {
219 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
220 # Object with schema name: TableFieldSchema
221 ],
222 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
223 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
224 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
225 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
226 },
227 ],
228 },
229 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800230 "extract": { # [Pick one] Configures an extract job.
231 "destinationUri": "A String", # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
232 "compression": "A String", # [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
233 "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','
234 "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
235 "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true.
236 "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000237 "A String",
238 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800239 "sourceTable": { # [Required] A reference to the table being exported.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000240 "projectId": "A String", # [Required] The ID of the project containing this table.
241 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
242 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
243 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000244 },
245 "copy": { # [Pick one] Copies a table.
246 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
247 "sourceTables": [ # [Pick one] Source tables to copy.
248 {
249 "projectId": "A String", # [Required] The ID of the project containing this table.
250 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
251 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
252 },
253 ],
254 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
255 "destinationTable": { # [Required] The destination table
256 "projectId": "A String", # [Required] The ID of the project containing this table.
257 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
258 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
259 },
260 "sourceTable": { # [Pick one] Source table to copy.
261 "projectId": "A String", # [Required] The ID of the project containing this table.
262 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
263 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
264 },
265 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800266 "dryRun": True or False, # [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
267 "query": { # [Pick one] Configures a query job.
268 "flattenResults": true, # [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
269 "maximumBillingTier": 1, # [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
270 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
271 "defaultDataset": { # [Optional] Specifies the default dataset to use for unqualified table names in the query.
272 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
273 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
274 },
275 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
276 "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000277 "projectId": "A String", # [Required] The ID of the project containing this table.
278 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
279 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
280 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800281 "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
282 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
283 "allowLargeResults": True or False, # If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
284 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
285 "query": "A String", # [Required] BigQuery SQL query to execute.
286 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
287 "tableDefinitions": { # [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
288 "a_key": {
289 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups.
290 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
291 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
292 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
293 "skipLeadingRows": 42, # [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.
294 "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
295 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
296 "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
297 },
298 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
299 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups.
300 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored.
301 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.
302 "A String",
303 ],
304 "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups.
305 "fields": [ # Describes the fields in a table.
306 {
307 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
308 # Object with schema name: TableFieldSchema
309 ],
310 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
311 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
312 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
313 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
314 },
315 ],
316 },
317 },
318 },
319 "userDefinedFunctionResources": [ # [Experimental] Describes user-defined function resources used in the query.
320 {
321 "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
322 "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
323 },
324 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000325 },
326 },
327 "id": "A String", # [Output-only] Opaque ID field of the job
328 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
329 },
330 "kind": "bigquery#jobCancelResponse", # The resource type of the response.
331 }</pre>
332</div>
333
334<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400335 <code class="details" id="get">get(projectId, jobId)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000336 <pre>Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.
John Asmuth614db982014-04-24 15:46:26 -0400337
338Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800339 projectId: string, [Required] Project ID of the requested job (required)
340 jobId: string, [Required] Job ID of the requested job (required)
John Asmuth614db982014-04-24 15:46:26 -0400341
342Returns:
343 An object of the form:
344
345 {
346 "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
347 "state": "A String", # [Output-only] Running state of the job.
348 "errors": [ # [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
349 {
350 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
351 "message": "A String", # A human-readable description of the error.
352 "reason": "A String", # A short error code that summarizes the error.
353 "location": "A String", # Specifies where the error occurred, if present.
354 },
355 ],
356 "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
357 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
358 "message": "A String", # A human-readable description of the error.
359 "reason": "A String", # A short error code that summarizes the error.
360 "location": "A String", # Specifies where the error occurred, if present.
361 },
362 },
363 "kind": "bigquery#job", # [Output-only] The type of the resource.
364 "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job.
365 "load": { # [Output-only] Statistics for a load job.
366 "outputRows": "A String", # [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
367 "inputFiles": "A String", # [Output-only] Number of source files in a load job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700368 "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job.
369 "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
John Asmuth614db982014-04-24 15:46:26 -0400370 },
371 "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
372 "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
373 "startTime": "A String", # [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
374 "query": { # [Output-only] Statistics for a query job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 "queryPlan": [ # [Output-only, Experimental] Describes execution plan for the query as a list of stages.
376 {
377 "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
378 "recordsWritten": "A String", # Number of records written by the stage.
379 "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
380 "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input.
381 "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input.
382 "steps": [ # List of operations within the stage in dependency order (approximately chronological).
383 {
384 "kind": "A String", # Machine-readable operation type.
385 "substeps": [ # Human-readable stage descriptions.
386 "A String",
387 ],
388 },
389 ],
390 "recordsRead": "A String", # Number of records read into the stage.
391 "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
392 "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output.
393 "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output.
394 "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
395 "id": "A String", # Unique ID for stage within plan.
396 "name": "A String", # Human-readable name for stage.
397 },
398 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700399 "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job.
400 "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800401 "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache.
402 "billingTier": 42, # [Output-only] Billing tier for the job.
403 "referencedTables": [ # [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
404 {
405 "projectId": "A String", # [Required] The ID of the project containing this table.
406 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
407 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
408 },
409 ],
John Asmuth614db982014-04-24 15:46:26 -0400410 },
411 "endTime": "A String", # [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
Craig Citroe633be12015-03-02 13:40:36 -0800412 "extract": { # [Output-only] Statistics for an extract job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 "destinationUriFileCounts": [ # [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
Craig Citroe633be12015-03-02 13:40:36 -0800414 "A String",
415 ],
416 },
John Asmuth614db982014-04-24 15:46:26 -0400417 },
418 "jobReference": { # [Optional] Reference describing the unique-per-user name of the job.
Craig Citroe633be12015-03-02 13:40:36 -0800419 "projectId": "A String", # [Required] The ID of the project containing this job.
420 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -0400421 },
422 "etag": "A String", # [Output-only] A hash of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800423 "user_email": "A String", # [Output-only] Email address of the user who ran the job.
John Asmuth614db982014-04-24 15:46:26 -0400424 "configuration": { # [Required] Describes the job configuration.
425 "load": { # [Pick one] Configures a load job.
426 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800427 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
John Asmuth614db982014-04-24 15:46:26 -0400428 "sourceFormat": "A String", # [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
429 "destinationTable": { # [Required] The destination table to load the data into.
Craig Citroe633be12015-03-02 13:40:36 -0800430 "projectId": "A String", # [Required] The ID of the project containing this table.
431 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
432 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400433 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000434 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
435 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
436 "allowJaggedRows": True or False, # [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
John Asmuth614db982014-04-24 15:46:26 -0400437 "skipLeadingRows": 42, # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000438 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
John Asmuth614db982014-04-24 15:46:26 -0400439 "A String",
440 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000441 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
John Asmuth614db982014-04-24 15:46:26 -0400442 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
443 "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property.
444 "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
445 "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000446 "projectionFields": [ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
Craig Citroe633be12015-03-02 13:40:36 -0800447 "A String",
448 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000449 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800450 "schema": { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
John Asmuth614db982014-04-24 15:46:26 -0400451 "fields": [ # Describes the fields in a table.
452 {
453 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
454 # Object with schema name: TableFieldSchema
455 ],
456 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -0800457 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
458 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -0400459 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
460 },
461 ],
462 },
463 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800464 "extract": { # [Pick one] Configures an extract job.
465 "destinationUri": "A String", # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
466 "compression": "A String", # [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
467 "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','
468 "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
469 "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true.
470 "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
John Asmuth614db982014-04-24 15:46:26 -0400471 "A String",
472 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800473 "sourceTable": { # [Required] A reference to the table being exported.
Craig Citroe633be12015-03-02 13:40:36 -0800474 "projectId": "A String", # [Required] The ID of the project containing this table.
475 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
476 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400477 },
John Asmuth614db982014-04-24 15:46:26 -0400478 },
479 "copy": { # [Pick one] Copies a table.
480 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
Craig Citro065b5302014-08-14 00:47:23 -0700481 "sourceTables": [ # [Pick one] Source tables to copy.
482 {
Craig Citroe633be12015-03-02 13:40:36 -0800483 "projectId": "A String", # [Required] The ID of the project containing this table.
484 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
485 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
Craig Citro065b5302014-08-14 00:47:23 -0700486 },
487 ],
John Asmuth614db982014-04-24 15:46:26 -0400488 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
489 "destinationTable": { # [Required] The destination table
Craig Citroe633be12015-03-02 13:40:36 -0800490 "projectId": "A String", # [Required] The ID of the project containing this table.
491 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
492 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400493 },
Craig Citro065b5302014-08-14 00:47:23 -0700494 "sourceTable": { # [Pick one] Source table to copy.
Craig Citroe633be12015-03-02 13:40:36 -0800495 "projectId": "A String", # [Required] The ID of the project containing this table.
496 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
497 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400498 },
499 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800500 "dryRun": True or False, # [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
501 "query": { # [Pick one] Configures a query job.
502 "flattenResults": true, # [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
503 "maximumBillingTier": 1, # [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
504 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
505 "defaultDataset": { # [Optional] Specifies the default dataset to use for unqualified table names in the query.
506 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
507 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
508 },
509 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
510 "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
Craig Citroe633be12015-03-02 13:40:36 -0800511 "projectId": "A String", # [Required] The ID of the project containing this table.
512 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
513 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400514 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800515 "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
516 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
517 "allowLargeResults": True or False, # If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
518 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
519 "query": "A String", # [Required] BigQuery SQL query to execute.
520 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
521 "tableDefinitions": { # [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
522 "a_key": {
523 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups.
524 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
525 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
526 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
527 "skipLeadingRows": 42, # [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.
528 "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
529 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
530 "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
531 },
532 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
533 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups.
534 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored.
535 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.
536 "A String",
537 ],
538 "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups.
539 "fields": [ # Describes the fields in a table.
540 {
541 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
542 # Object with schema name: TableFieldSchema
543 ],
544 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
545 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
546 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
547 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
548 },
549 ],
550 },
551 },
552 },
553 "userDefinedFunctionResources": [ # [Experimental] Describes user-defined function resources used in the query.
554 {
555 "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
556 "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
557 },
558 ],
John Asmuth614db982014-04-24 15:46:26 -0400559 },
560 },
561 "id": "A String", # [Output-only] Opaque ID field of the job
562 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
563 }</pre>
564</div>
565
566<div class="method">
567 <code class="details" id="getQueryResults">getQueryResults(projectId, jobId, timeoutMs=None, pageToken=None, maxResults=None, startIndex=None)</code>
568 <pre>Retrieves the results of a query job.
569
570Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800571 projectId: string, [Required] Project ID of the query job (required)
572 jobId: string, [Required] Job ID of the query job (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700573 timeoutMs: integer, How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false
John Asmuth614db982014-04-24 15:46:26 -0400574 pageToken: string, Page token, returned by a previous call, to request the next page of results
575 maxResults: integer, Maximum number of results to read
576 startIndex: string, Zero-based index of the starting row
577
578Returns:
579 An object of the form:
580
581 {
582 "kind": "bigquery#getQueryResultsResponse", # The resource type of the response.
Takashi Matsuo06694102015-09-11 13:55:40 -0700583 "errors": [ # [Output-only] All errors and warnings encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000584 {
Takashi Matsuo06694102015-09-11 13:55:40 -0700585 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
586 "message": "A String", # A human-readable description of the error.
587 "reason": "A String", # A short error code that summarizes the error.
588 "location": "A String", # Specifies where the error occurred, if present.
John Asmuth614db982014-04-24 15:46:26 -0400589 },
590 ],
591 "jobReference": { # Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults).
Craig Citroe633be12015-03-02 13:40:36 -0800592 "projectId": "A String", # [Required] The ID of the project containing this job.
593 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -0400594 },
595 "pageToken": "A String", # A token used for paging results.
596 "jobComplete": True or False, # Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.
597 "totalRows": "A String", # The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully.
Craig Citroe633be12015-03-02 13:40:36 -0800598 "totalBytesProcessed": "A String", # The total number of bytes processed for this query.
John Asmuth614db982014-04-24 15:46:26 -0400599 "cacheHit": True or False, # Whether the query result was fetched from the query cache.
600 "etag": "A String", # A hash of this response.
Takashi Matsuo06694102015-09-11 13:55:40 -0700601 "rows": [ # An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully.
602 {
603 "f": [ # Represents a single row in the result set, consisting of one or more fields.
604 {
605 "v": "",
606 },
607 ],
608 },
609 ],
John Asmuth614db982014-04-24 15:46:26 -0400610 "schema": { # The schema of the results. Present only when the query completes successfully.
611 "fields": [ # Describes the fields in a table.
612 {
613 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
614 # Object with schema name: TableFieldSchema
615 ],
616 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -0800617 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
618 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -0400619 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
620 },
621 ],
622 },
623 }</pre>
624</div>
625
626<div class="method">
627 <code class="details" id="insert">insert(projectId, body=None, media_body=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000628 <pre>Starts a new asynchronous job. Requires the Can View project role.
John Asmuth614db982014-04-24 15:46:26 -0400629
630Args:
631 projectId: string, Project ID of the project that will be billed for the job (required)
632 body: object, The request body.
633 The object takes the form of:
634
635{
636 "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
637 "state": "A String", # [Output-only] Running state of the job.
638 "errors": [ # [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
639 {
640 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
641 "message": "A String", # A human-readable description of the error.
642 "reason": "A String", # A short error code that summarizes the error.
643 "location": "A String", # Specifies where the error occurred, if present.
644 },
645 ],
646 "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
647 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
648 "message": "A String", # A human-readable description of the error.
649 "reason": "A String", # A short error code that summarizes the error.
650 "location": "A String", # Specifies where the error occurred, if present.
651 },
652 },
653 "kind": "bigquery#job", # [Output-only] The type of the resource.
654 "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job.
655 "load": { # [Output-only] Statistics for a load job.
656 "outputRows": "A String", # [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
657 "inputFiles": "A String", # [Output-only] Number of source files in a load job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700658 "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job.
659 "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
John Asmuth614db982014-04-24 15:46:26 -0400660 },
661 "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
662 "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
663 "startTime": "A String", # [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
664 "query": { # [Output-only] Statistics for a query job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800665 "queryPlan": [ # [Output-only, Experimental] Describes execution plan for the query as a list of stages.
666 {
667 "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
668 "recordsWritten": "A String", # Number of records written by the stage.
669 "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
670 "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input.
671 "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input.
672 "steps": [ # List of operations within the stage in dependency order (approximately chronological).
673 {
674 "kind": "A String", # Machine-readable operation type.
675 "substeps": [ # Human-readable stage descriptions.
676 "A String",
677 ],
678 },
679 ],
680 "recordsRead": "A String", # Number of records read into the stage.
681 "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
682 "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output.
683 "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output.
684 "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
685 "id": "A String", # Unique ID for stage within plan.
686 "name": "A String", # Human-readable name for stage.
687 },
688 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700689 "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job.
690 "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800691 "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache.
692 "billingTier": 42, # [Output-only] Billing tier for the job.
693 "referencedTables": [ # [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
694 {
695 "projectId": "A String", # [Required] The ID of the project containing this table.
696 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
697 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
698 },
699 ],
John Asmuth614db982014-04-24 15:46:26 -0400700 },
701 "endTime": "A String", # [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
Craig Citroe633be12015-03-02 13:40:36 -0800702 "extract": { # [Output-only] Statistics for an extract job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700703 "destinationUriFileCounts": [ # [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
Craig Citroe633be12015-03-02 13:40:36 -0800704 "A String",
705 ],
706 },
John Asmuth614db982014-04-24 15:46:26 -0400707 },
708 "jobReference": { # [Optional] Reference describing the unique-per-user name of the job.
Craig Citroe633be12015-03-02 13:40:36 -0800709 "projectId": "A String", # [Required] The ID of the project containing this job.
710 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -0400711 },
712 "etag": "A String", # [Output-only] A hash of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800713 "user_email": "A String", # [Output-only] Email address of the user who ran the job.
John Asmuth614db982014-04-24 15:46:26 -0400714 "configuration": { # [Required] Describes the job configuration.
715 "load": { # [Pick one] Configures a load job.
716 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800717 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
John Asmuth614db982014-04-24 15:46:26 -0400718 "sourceFormat": "A String", # [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
719 "destinationTable": { # [Required] The destination table to load the data into.
Craig Citroe633be12015-03-02 13:40:36 -0800720 "projectId": "A String", # [Required] The ID of the project containing this table.
721 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
722 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400723 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000724 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
725 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
726 "allowJaggedRows": True or False, # [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
John Asmuth614db982014-04-24 15:46:26 -0400727 "skipLeadingRows": 42, # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000728 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
John Asmuth614db982014-04-24 15:46:26 -0400729 "A String",
730 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000731 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
John Asmuth614db982014-04-24 15:46:26 -0400732 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
733 "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property.
734 "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
735 "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000736 "projectionFields": [ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
Craig Citroe633be12015-03-02 13:40:36 -0800737 "A String",
738 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000739 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800740 "schema": { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
John Asmuth614db982014-04-24 15:46:26 -0400741 "fields": [ # Describes the fields in a table.
742 {
743 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
744 # Object with schema name: TableFieldSchema
745 ],
746 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -0800747 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
748 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -0400749 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
750 },
751 ],
752 },
753 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800754 "extract": { # [Pick one] Configures an extract job.
755 "destinationUri": "A String", # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
756 "compression": "A String", # [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
757 "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','
758 "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
759 "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true.
760 "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
John Asmuth614db982014-04-24 15:46:26 -0400761 "A String",
762 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800763 "sourceTable": { # [Required] A reference to the table being exported.
Craig Citroe633be12015-03-02 13:40:36 -0800764 "projectId": "A String", # [Required] The ID of the project containing this table.
765 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
766 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400767 },
John Asmuth614db982014-04-24 15:46:26 -0400768 },
769 "copy": { # [Pick one] Copies a table.
770 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
Craig Citro065b5302014-08-14 00:47:23 -0700771 "sourceTables": [ # [Pick one] Source tables to copy.
772 {
Craig Citroe633be12015-03-02 13:40:36 -0800773 "projectId": "A String", # [Required] The ID of the project containing this table.
774 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
775 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
Craig Citro065b5302014-08-14 00:47:23 -0700776 },
777 ],
John Asmuth614db982014-04-24 15:46:26 -0400778 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
779 "destinationTable": { # [Required] The destination table
Craig Citroe633be12015-03-02 13:40:36 -0800780 "projectId": "A String", # [Required] The ID of the project containing this table.
781 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
782 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400783 },
Craig Citro065b5302014-08-14 00:47:23 -0700784 "sourceTable": { # [Pick one] Source table to copy.
Craig Citroe633be12015-03-02 13:40:36 -0800785 "projectId": "A String", # [Required] The ID of the project containing this table.
786 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
787 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400788 },
789 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800790 "dryRun": True or False, # [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
791 "query": { # [Pick one] Configures a query job.
792 "flattenResults": true, # [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
793 "maximumBillingTier": 1, # [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
794 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
795 "defaultDataset": { # [Optional] Specifies the default dataset to use for unqualified table names in the query.
796 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
797 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
798 },
799 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
800 "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
Craig Citroe633be12015-03-02 13:40:36 -0800801 "projectId": "A String", # [Required] The ID of the project containing this table.
802 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
803 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400804 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800805 "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
806 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
807 "allowLargeResults": True or False, # If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
808 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
809 "query": "A String", # [Required] BigQuery SQL query to execute.
810 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
811 "tableDefinitions": { # [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
812 "a_key": {
813 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups.
814 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
815 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
816 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
817 "skipLeadingRows": 42, # [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.
818 "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
819 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
820 "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
821 },
822 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
823 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups.
824 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored.
825 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.
826 "A String",
827 ],
828 "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups.
829 "fields": [ # Describes the fields in a table.
830 {
831 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
832 # Object with schema name: TableFieldSchema
833 ],
834 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
835 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
836 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
837 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
838 },
839 ],
840 },
841 },
842 },
843 "userDefinedFunctionResources": [ # [Experimental] Describes user-defined function resources used in the query.
844 {
845 "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
846 "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
847 },
848 ],
John Asmuth614db982014-04-24 15:46:26 -0400849 },
850 },
851 "id": "A String", # [Output-only] Opaque ID field of the job
852 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
853 }
854
855 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
856
857Returns:
858 An object of the form:
859
860 {
861 "status": { # [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
862 "state": "A String", # [Output-only] Running state of the job.
863 "errors": [ # [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
864 {
865 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
866 "message": "A String", # A human-readable description of the error.
867 "reason": "A String", # A short error code that summarizes the error.
868 "location": "A String", # Specifies where the error occurred, if present.
869 },
870 ],
871 "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
872 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
873 "message": "A String", # A human-readable description of the error.
874 "reason": "A String", # A short error code that summarizes the error.
875 "location": "A String", # Specifies where the error occurred, if present.
876 },
877 },
878 "kind": "bigquery#job", # [Output-only] The type of the resource.
879 "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job.
880 "load": { # [Output-only] Statistics for a load job.
881 "outputRows": "A String", # [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
882 "inputFiles": "A String", # [Output-only] Number of source files in a load job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700883 "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job.
884 "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
John Asmuth614db982014-04-24 15:46:26 -0400885 },
886 "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
887 "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
888 "startTime": "A String", # [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
889 "query": { # [Output-only] Statistics for a query job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800890 "queryPlan": [ # [Output-only, Experimental] Describes execution plan for the query as a list of stages.
891 {
892 "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
893 "recordsWritten": "A String", # Number of records written by the stage.
894 "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
895 "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input.
896 "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input.
897 "steps": [ # List of operations within the stage in dependency order (approximately chronological).
898 {
899 "kind": "A String", # Machine-readable operation type.
900 "substeps": [ # Human-readable stage descriptions.
901 "A String",
902 ],
903 },
904 ],
905 "recordsRead": "A String", # Number of records read into the stage.
906 "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
907 "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output.
908 "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output.
909 "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
910 "id": "A String", # Unique ID for stage within plan.
911 "name": "A String", # Human-readable name for stage.
912 },
913 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700914 "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job.
915 "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800916 "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache.
917 "billingTier": 42, # [Output-only] Billing tier for the job.
918 "referencedTables": [ # [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
919 {
920 "projectId": "A String", # [Required] The ID of the project containing this table.
921 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
922 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
923 },
924 ],
John Asmuth614db982014-04-24 15:46:26 -0400925 },
926 "endTime": "A String", # [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
Craig Citroe633be12015-03-02 13:40:36 -0800927 "extract": { # [Output-only] Statistics for an extract job.
Takashi Matsuo06694102015-09-11 13:55:40 -0700928 "destinationUriFileCounts": [ # [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
Craig Citroe633be12015-03-02 13:40:36 -0800929 "A String",
930 ],
931 },
John Asmuth614db982014-04-24 15:46:26 -0400932 },
933 "jobReference": { # [Optional] Reference describing the unique-per-user name of the job.
Craig Citroe633be12015-03-02 13:40:36 -0800934 "projectId": "A String", # [Required] The ID of the project containing this job.
935 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -0400936 },
937 "etag": "A String", # [Output-only] A hash of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800938 "user_email": "A String", # [Output-only] Email address of the user who ran the job.
John Asmuth614db982014-04-24 15:46:26 -0400939 "configuration": { # [Required] Describes the job configuration.
940 "load": { # [Pick one] Configures a load job.
941 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800942 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
John Asmuth614db982014-04-24 15:46:26 -0400943 "sourceFormat": "A String", # [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
944 "destinationTable": { # [Required] The destination table to load the data into.
Craig Citroe633be12015-03-02 13:40:36 -0800945 "projectId": "A String", # [Required] The ID of the project containing this table.
946 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
947 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400948 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000949 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
950 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
951 "allowJaggedRows": True or False, # [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
John Asmuth614db982014-04-24 15:46:26 -0400952 "skipLeadingRows": 42, # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000953 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
John Asmuth614db982014-04-24 15:46:26 -0400954 "A String",
955 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000956 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
John Asmuth614db982014-04-24 15:46:26 -0400957 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
958 "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property.
959 "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
960 "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000961 "projectionFields": [ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
Craig Citroe633be12015-03-02 13:40:36 -0800962 "A String",
963 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000964 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800965 "schema": { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
John Asmuth614db982014-04-24 15:46:26 -0400966 "fields": [ # Describes the fields in a table.
967 {
968 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
969 # Object with schema name: TableFieldSchema
970 ],
971 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -0800972 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
973 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -0400974 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
975 },
976 ],
977 },
978 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800979 "extract": { # [Pick one] Configures an extract job.
980 "destinationUri": "A String", # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
981 "compression": "A String", # [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
982 "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','
983 "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
984 "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true.
985 "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
John Asmuth614db982014-04-24 15:46:26 -0400986 "A String",
987 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800988 "sourceTable": { # [Required] A reference to the table being exported.
Craig Citroe633be12015-03-02 13:40:36 -0800989 "projectId": "A String", # [Required] The ID of the project containing this table.
990 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
991 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400992 },
John Asmuth614db982014-04-24 15:46:26 -0400993 },
994 "copy": { # [Pick one] Copies a table.
995 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
Craig Citro065b5302014-08-14 00:47:23 -0700996 "sourceTables": [ # [Pick one] Source tables to copy.
997 {
Craig Citroe633be12015-03-02 13:40:36 -0800998 "projectId": "A String", # [Required] The ID of the project containing this table.
999 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1000 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
Craig Citro065b5302014-08-14 00:47:23 -07001001 },
1002 ],
John Asmuth614db982014-04-24 15:46:26 -04001003 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1004 "destinationTable": { # [Required] The destination table
Craig Citroe633be12015-03-02 13:40:36 -08001005 "projectId": "A String", # [Required] The ID of the project containing this table.
1006 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1007 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001008 },
Craig Citro065b5302014-08-14 00:47:23 -07001009 "sourceTable": { # [Pick one] Source table to copy.
Craig Citroe633be12015-03-02 13:40:36 -08001010 "projectId": "A String", # [Required] The ID of the project containing this table.
1011 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1012 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001013 },
1014 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001015 "dryRun": True or False, # [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
1016 "query": { # [Pick one] Configures a query job.
1017 "flattenResults": true, # [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
1018 "maximumBillingTier": 1, # [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
1019 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
1020 "defaultDataset": { # [Optional] Specifies the default dataset to use for unqualified table names in the query.
1021 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
1022 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1023 },
1024 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
1025 "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
Craig Citroe633be12015-03-02 13:40:36 -08001026 "projectId": "A String", # [Required] The ID of the project containing this table.
1027 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1028 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001029 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001030 "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
1031 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1032 "allowLargeResults": True or False, # If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
1033 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1034 "query": "A String", # [Required] BigQuery SQL query to execute.
1035 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
1036 "tableDefinitions": { # [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1037 "a_key": {
1038 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups.
1039 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
1040 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
1041 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
1042 "skipLeadingRows": 42, # [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.
1043 "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
1044 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
1045 "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1046 },
1047 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
1048 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups.
1049 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored.
1050 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.
1051 "A String",
1052 ],
1053 "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups.
1054 "fields": [ # Describes the fields in a table.
1055 {
1056 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1057 # Object with schema name: TableFieldSchema
1058 ],
1059 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
1060 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
1061 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
1062 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1063 },
1064 ],
1065 },
1066 },
1067 },
1068 "userDefinedFunctionResources": [ # [Experimental] Describes user-defined function resources used in the query.
1069 {
1070 "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1071 "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
1072 },
1073 ],
John Asmuth614db982014-04-24 15:46:26 -04001074 },
1075 },
1076 "id": "A String", # [Output-only] Opaque ID field of the job
1077 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
1078 }</pre>
1079</div>
1080
1081<div class="method">
1082 <code class="details" id="list">list(projectId, projection=None, stateFilter=None, pageToken=None, allUsers=None, maxResults=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001083 <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 -04001084
1085Args:
1086 projectId: string, Project ID of the jobs to list (required)
1087 projection: string, Restrict information returned to a set of selected fields
1088 Allowed values
1089 full - Includes all job data
1090 minimal - Does not include the job configuration
1091 stateFilter: string, Filter for job state (repeated)
1092 Allowed values
1093 done - Finished jobs
1094 pending - Pending jobs
1095 running - Running jobs
1096 pageToken: string, Page token, returned by a previous call, to request the next page of results
1097 allUsers: boolean, Whether to display jobs owned by all users in the project. Default false
1098 maxResults: integer, Maximum number of results to return
1099
1100Returns:
1101 An object of the form:
1102
1103 {
1104 "nextPageToken": "A String", # A token to request the next page of results.
John Asmuth614db982014-04-24 15:46:26 -04001105 "kind": "bigquery#jobList", # The resource type of the response.
1106 "etag": "A String", # A hash of this page of results.
1107 "jobs": [ # List of jobs that were requested.
1108 {
1109 "status": { # [Full-projection-only] Describes the state of the job.
1110 "state": "A String", # [Output-only] Running state of the job.
1111 "errors": [ # [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
1112 {
1113 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
1114 "message": "A String", # A human-readable description of the error.
1115 "reason": "A String", # A short error code that summarizes the error.
1116 "location": "A String", # Specifies where the error occurred, if present.
1117 },
1118 ],
1119 "errorResult": { # [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
1120 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
1121 "message": "A String", # A human-readable description of the error.
1122 "reason": "A String", # A short error code that summarizes the error.
1123 "location": "A String", # Specifies where the error occurred, if present.
1124 },
1125 },
1126 "kind": "bigquery#job", # The resource type.
1127 "statistics": { # [Output-only] Information about the job, including starting time and ending time of the job.
1128 "load": { # [Output-only] Statistics for a load job.
1129 "outputRows": "A String", # [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
1130 "inputFiles": "A String", # [Output-only] Number of source files in a load job.
Takashi Matsuo06694102015-09-11 13:55:40 -07001131 "inputFileBytes": "A String", # [Output-only] Number of bytes of source data in a load job.
1132 "outputBytes": "A String", # [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
John Asmuth614db982014-04-24 15:46:26 -04001133 },
1134 "creationTime": "A String", # [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
1135 "totalBytesProcessed": "A String", # [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
1136 "startTime": "A String", # [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
1137 "query": { # [Output-only] Statistics for a query job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001138 "queryPlan": [ # [Output-only, Experimental] Describes execution plan for the query as a list of stages.
1139 {
1140 "computeRatioMax": 3.14, # Relative amount of time the slowest shard spent on CPU-bound tasks.
1141 "recordsWritten": "A String", # Number of records written by the stage.
1142 "waitRatioMax": 3.14, # Relative amount of time the slowest shard spent waiting to be scheduled.
1143 "readRatioAvg": 3.14, # Relative amount of time the average shard spent reading input.
1144 "readRatioMax": 3.14, # Relative amount of time the slowest shard spent reading input.
1145 "steps": [ # List of operations within the stage in dependency order (approximately chronological).
1146 {
1147 "kind": "A String", # Machine-readable operation type.
1148 "substeps": [ # Human-readable stage descriptions.
1149 "A String",
1150 ],
1151 },
1152 ],
1153 "recordsRead": "A String", # Number of records read into the stage.
1154 "computeRatioAvg": 3.14, # Relative amount of time the average shard spent on CPU-bound tasks.
1155 "writeRatioMax": 3.14, # Relative amount of time the slowest shard spent on writing output.
1156 "writeRatioAvg": 3.14, # Relative amount of time the average shard spent on writing output.
1157 "waitRatioAvg": 3.14, # Relative amount of time the average shard spent waiting to be scheduled.
1158 "id": "A String", # Unique ID for stage within plan.
1159 "name": "A String", # Human-readable name for stage.
1160 },
1161 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001162 "totalBytesBilled": "A String", # [Output-only] Total bytes billed for the job.
1163 "totalBytesProcessed": "A String", # [Output-only] Total bytes processed for the job.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001164 "cacheHit": True or False, # [Output-only] Whether the query result was fetched from the query cache.
1165 "billingTier": 42, # [Output-only] Billing tier for the job.
1166 "referencedTables": [ # [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
1167 {
1168 "projectId": "A String", # [Required] The ID of the project containing this table.
1169 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1170 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
1171 },
1172 ],
John Asmuth614db982014-04-24 15:46:26 -04001173 },
1174 "endTime": "A String", # [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
Craig Citroe633be12015-03-02 13:40:36 -08001175 "extract": { # [Output-only] Statistics for an extract job.
Takashi Matsuo06694102015-09-11 13:55:40 -07001176 "destinationUriFileCounts": [ # [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
Craig Citroe633be12015-03-02 13:40:36 -08001177 "A String",
1178 ],
1179 },
John Asmuth614db982014-04-24 15:46:26 -04001180 },
1181 "jobReference": { # Job reference uniquely identifying the job.
Craig Citroe633be12015-03-02 13:40:36 -08001182 "projectId": "A String", # [Required] The ID of the project containing this job.
1183 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -04001184 },
1185 "state": "A String", # Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
Craig Citroe633be12015-03-02 13:40:36 -08001186 "user_email": "A String", # [Full-projection-only] Email address of the user who ran the job.
John Asmuth614db982014-04-24 15:46:26 -04001187 "configuration": { # [Full-projection-only] Specifies the job configuration.
1188 "load": { # [Pick one] Configures a load job.
1189 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001190 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
John Asmuth614db982014-04-24 15:46:26 -04001191 "sourceFormat": "A String", # [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
1192 "destinationTable": { # [Required] The destination table to load the data into.
Craig Citroe633be12015-03-02 13:40:36 -08001193 "projectId": "A String", # [Required] The ID of the project containing this table.
1194 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1195 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001196 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001197 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1198 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
1199 "allowJaggedRows": True or False, # [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
John Asmuth614db982014-04-24 15:46:26 -04001200 "skipLeadingRows": 42, # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001201 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
John Asmuth614db982014-04-24 15:46:26 -04001202 "A String",
1203 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001204 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
John Asmuth614db982014-04-24 15:46:26 -04001205 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1206 "schemaInlineFormat": "A String", # [Deprecated] The format of the schemaInline property.
1207 "schemaInline": "A String", # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
1208 "allowQuotedNewlines": True or False, # Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001209 "projectionFields": [ # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
Craig Citroe633be12015-03-02 13:40:36 -08001210 "A String",
1211 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001212 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001213 "schema": { # [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
John Asmuth614db982014-04-24 15:46:26 -04001214 "fields": [ # Describes the fields in a table.
1215 {
1216 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1217 # Object with schema name: TableFieldSchema
1218 ],
1219 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -08001220 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
1221 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -04001222 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1223 },
1224 ],
1225 },
1226 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001227 "extract": { # [Pick one] Configures an extract job.
1228 "destinationUri": "A String", # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
1229 "compression": "A String", # [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
1230 "fieldDelimiter": "A String", # [Optional] Delimiter to use between fields in the exported data. Default is ','
1231 "destinationFormat": "A String", # [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
1232 "printHeader": true, # [Optional] Whether to print out a header row in the results. Default is true.
1233 "destinationUris": [ # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
John Asmuth614db982014-04-24 15:46:26 -04001234 "A String",
1235 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001236 "sourceTable": { # [Required] A reference to the table being exported.
Craig Citroe633be12015-03-02 13:40:36 -08001237 "projectId": "A String", # [Required] The ID of the project containing this table.
1238 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1239 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001240 },
John Asmuth614db982014-04-24 15:46:26 -04001241 },
1242 "copy": { # [Pick one] Copies a table.
1243 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
Craig Citro065b5302014-08-14 00:47:23 -07001244 "sourceTables": [ # [Pick one] Source tables to copy.
1245 {
Craig Citroe633be12015-03-02 13:40:36 -08001246 "projectId": "A String", # [Required] The ID of the project containing this table.
1247 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1248 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
Craig Citro065b5302014-08-14 00:47:23 -07001249 },
1250 ],
John Asmuth614db982014-04-24 15:46:26 -04001251 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1252 "destinationTable": { # [Required] The destination table
Craig Citroe633be12015-03-02 13:40:36 -08001253 "projectId": "A String", # [Required] The ID of the project containing this table.
1254 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1255 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001256 },
Craig Citro065b5302014-08-14 00:47:23 -07001257 "sourceTable": { # [Pick one] Source table to copy.
Craig Citroe633be12015-03-02 13:40:36 -08001258 "projectId": "A String", # [Required] The ID of the project containing this table.
1259 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1260 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001261 },
1262 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001263 "dryRun": True or False, # [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
1264 "query": { # [Pick one] Configures a query job.
1265 "flattenResults": true, # [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
1266 "maximumBillingTier": 1, # [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
1267 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
1268 "defaultDataset": { # [Optional] Specifies the default dataset to use for unqualified table names in the query.
1269 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
1270 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1271 },
1272 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
1273 "destinationTable": { # [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
Craig Citroe633be12015-03-02 13:40:36 -08001274 "projectId": "A String", # [Required] The ID of the project containing this table.
1275 "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1276 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -04001277 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001278 "priority": "A String", # [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
1279 "writeDisposition": "A String", # [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1280 "allowLargeResults": True or False, # If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
1281 "createDisposition": "A String", # [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1282 "query": "A String", # [Required] BigQuery SQL query to execute.
1283 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
1284 "tableDefinitions": { # [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1285 "a_key": {
1286 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups.
1287 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
1288 "fieldDelimiter": "A String", # [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
1289 "encoding": "A String", # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
1290 "skipLeadingRows": 42, # [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.
1291 "allowJaggedRows": True or False, # [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
1292 "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
1293 "allowQuotedNewlines": True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1294 },
1295 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
1296 "maxBadRecords": 42, # [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups.
1297 "ignoreUnknownValues": True or False, # [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored.
1298 "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.
1299 "A String",
1300 ],
1301 "schema": { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups.
1302 "fields": [ # Describes the fields in a table.
1303 {
1304 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1305 # Object with schema name: TableFieldSchema
1306 ],
1307 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
1308 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
1309 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
1310 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1311 },
1312 ],
1313 },
1314 },
1315 },
1316 "userDefinedFunctionResources": [ # [Experimental] Describes user-defined function resources used in the query.
1317 {
1318 "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1319 "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
1320 },
1321 ],
John Asmuth614db982014-04-24 15:46:26 -04001322 },
1323 },
1324 "id": "A String", # Unique opaque ID of the job.
1325 "errorResult": { # A result object that will be present only if the job has failed.
1326 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
1327 "message": "A String", # A human-readable description of the error.
1328 "reason": "A String", # A short error code that summarizes the error.
1329 "location": "A String", # Specifies where the error occurred, if present.
1330 },
1331 },
1332 ],
1333 }</pre>
1334</div>
1335
1336<div class="method">
1337 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1338 <pre>Retrieves the next page of results.
1339
1340Args:
1341 previous_request: The request for the previous page. (required)
1342 previous_response: The response from the request for the previous page. (required)
1343
1344Returns:
1345 A request object that you can call 'execute()' on to request the next
1346 page. Returns None if there are no more items in the collection.
1347 </pre>
1348</div>
1349
1350<div class="method">
1351 <code class="details" id="query">query(projectId, body)</code>
1352 <pre>Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
1353
1354Args:
1355 projectId: string, Project ID of the project billed for the query (required)
1356 body: object, The request body. (required)
1357 The object takes the form of:
1358
1359{
1360 "timeoutMs": 42, # [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).
1361 "kind": "bigquery#queryRequest", # The resource type of the request.
Takashi Matsuo06694102015-09-11 13:55:40 -07001362 "dryRun": True or False, # [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001363 "useQueryCache": true, # [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true.
John Asmuth614db982014-04-24 15:46:26 -04001364 "defaultDataset": { # [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'.
Craig Citroe633be12015-03-02 13:40:36 -08001365 "projectId": "A String", # [Optional] The ID of the project containing this dataset.
1366 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -04001367 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001368 "useLegacySql": True or False, # [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's updated SQL dialect with improved standards compliance. When using BigQuery's updated SQL, the values of allowLargeResults and flattenResults are ignored. Queries with useLegacySql set to false will be run as if allowLargeResults is true and flattenResults is false.
John Asmuth614db982014-04-24 15:46:26 -04001369 "maxResults": 42, # [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.
1370 "query": "A String", # [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]".
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001371 "preserveNulls": True or False, # [Deprecated] This property is deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001372 }
1373
1374
1375Returns:
1376 An object of the form:
1377
1378 {
1379 "kind": "bigquery#queryResponse", # The resource type.
Takashi Matsuo06694102015-09-11 13:55:40 -07001380 "errors": [ # [Output-only] All errors and warnings encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001381 {
Takashi Matsuo06694102015-09-11 13:55:40 -07001382 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
1383 "message": "A String", # A human-readable description of the error.
1384 "reason": "A String", # A short error code that summarizes the error.
1385 "location": "A String", # Specifies where the error occurred, if present.
John Asmuth614db982014-04-24 15:46:26 -04001386 },
1387 ],
1388 "jobReference": { # Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults).
Craig Citroe633be12015-03-02 13:40:36 -08001389 "projectId": "A String", # [Required] The ID of the project containing this job.
1390 "jobId": "A String", # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -04001391 },
1392 "pageToken": "A String", # A token used for paging results.
1393 "jobComplete": True or False, # Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.
1394 "totalRows": "A String", # The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results.
1395 "totalBytesProcessed": "A String", # The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run.
1396 "cacheHit": True or False, # Whether the query result was fetched from the query cache.
Takashi Matsuo06694102015-09-11 13:55:40 -07001397 "rows": [ # An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above.
1398 {
1399 "f": [ # Represents a single row in the result set, consisting of one or more fields.
1400 {
1401 "v": "",
1402 },
1403 ],
1404 },
1405 ],
John Asmuth614db982014-04-24 15:46:26 -04001406 "schema": { # The schema of the results. Present only when the query completes successfully.
1407 "fields": [ # Describes the fields in a table.
1408 {
1409 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1410 # Object with schema name: TableFieldSchema
1411 ],
1412 "type": "A String", # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
Craig Citroe633be12015-03-02 13:40:36 -08001413 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
1414 "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
John Asmuth614db982014-04-24 15:46:26 -04001415 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1416 },
1417 ],
1418 },
1419 }</pre>
1420</div>
1421
1422</body></html>