blob: 52bd8ed3a4ef32e8dd37991f52197e44be920e28 [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -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.tables.html">tables</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(projectId, datasetId, tableId)</a></code></p>
79<p class="firstline">Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.</p>
80<p class="toc_element">
81 <code><a href="#get">get(projectId, datasetId, tableId)</a></code></p>
82<p class="firstline">Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(projectId, datasetId, body)</a></code></p>
85<p class="firstline">Creates a new, empty table in the dataset.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=None)</a></code></p>
88<p class="firstline">Lists all tables in the specified dataset.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#patch">patch(projectId, datasetId, tableId, body)</a></code></p>
94<p class="firstline">Updates information in an existing table, specified by tableId. This method supports patch semantics.</p>
95<p class="toc_element">
96 <code><a href="#update">update(projectId, datasetId, tableId, body)</a></code></p>
97<p class="firstline">Updates information in an existing table, specified by tableId.</p>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="delete">delete(projectId, datasetId, tableId)</code>
101 <pre>Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
102
103Args:
104 projectId: string, Project ID of the table to delete (required)
105 datasetId: string, Dataset ID of the table to delete (required)
106 tableId: string, Table ID of the table to delete (required)
107</pre>
108</div>
109
110<div class="method">
111 <code class="details" id="get">get(projectId, datasetId, tableId)</code>
112 <pre>Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
113
114Args:
115 projectId: string, Project ID of the requested table (required)
116 datasetId: string, Dataset ID of the requested table (required)
117 tableId: string, Table ID of the requested table (required)
118
119Returns:
120 An object of the form:
121
122 {
123 "kind": "bigquery#table", # [Output-only] The type of the resource.
124 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
125 "description": "A String", # [Optional] A user-friendly description of this table.
126 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
127 "tableReference": { # [Required] Reference describing the ID of this table.
128 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
129 "tableId": "A String", # [Required] ID of the table.
130 "datasetId": "A String", # [Required] ID of the dataset containing the table.
131 },
132 "numRows": "A String", # [Output-only] The number of rows of data in this table.
133 "numBytes": "A String", # [Output-only] The size of the table in bytes.
134 "etag": "A String", # [Output-only] A hash of this resource.
135 "friendlyName": "A String", # [Optional] A descriptive name for this table.
136 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
137 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
138 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
139 "schema": { # [Optional] Describes the schema of this table.
140 "fields": [ # Describes the fields in a table.
141 {
142 "fields": [ # [Optional] Describes nested fields when type is RECORD.
143 # Object with schema name: TableFieldSchema
144 ],
145 "type": "A String", # [Required] Data type of the field.
146 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
147 "name": "A String", # [Required] Name of the field.
148 },
149 ],
150 },
151 }</pre>
152</div>
153
154<div class="method">
155 <code class="details" id="insert">insert(projectId, datasetId, body)</code>
156 <pre>Creates a new, empty table in the dataset.
157
158Args:
159 projectId: string, Project ID of the new table (required)
160 datasetId: string, Dataset ID of the new table (required)
161 body: object, The request body. (required)
162 The object takes the form of:
163
164{
165 "kind": "bigquery#table", # [Output-only] The type of the resource.
166 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
167 "description": "A String", # [Optional] A user-friendly description of this table.
168 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
169 "tableReference": { # [Required] Reference describing the ID of this table.
170 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
171 "tableId": "A String", # [Required] ID of the table.
172 "datasetId": "A String", # [Required] ID of the dataset containing the table.
173 },
174 "numRows": "A String", # [Output-only] The number of rows of data in this table.
175 "numBytes": "A String", # [Output-only] The size of the table in bytes.
176 "etag": "A String", # [Output-only] A hash of this resource.
177 "friendlyName": "A String", # [Optional] A descriptive name for this table.
178 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
179 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
180 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
181 "schema": { # [Optional] Describes the schema of this table.
182 "fields": [ # Describes the fields in a table.
183 {
184 "fields": [ # [Optional] Describes nested fields when type is RECORD.
185 # Object with schema name: TableFieldSchema
186 ],
187 "type": "A String", # [Required] Data type of the field.
188 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
189 "name": "A String", # [Required] Name of the field.
190 },
191 ],
192 },
193 }
194
195
196Returns:
197 An object of the form:
198
199 {
200 "kind": "bigquery#table", # [Output-only] The type of the resource.
201 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
202 "description": "A String", # [Optional] A user-friendly description of this table.
203 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
204 "tableReference": { # [Required] Reference describing the ID of this table.
205 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
206 "tableId": "A String", # [Required] ID of the table.
207 "datasetId": "A String", # [Required] ID of the dataset containing the table.
208 },
209 "numRows": "A String", # [Output-only] The number of rows of data in this table.
210 "numBytes": "A String", # [Output-only] The size of the table in bytes.
211 "etag": "A String", # [Output-only] A hash of this resource.
212 "friendlyName": "A String", # [Optional] A descriptive name for this table.
213 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
214 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
215 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
216 "schema": { # [Optional] Describes the schema of this table.
217 "fields": [ # Describes the fields in a table.
218 {
219 "fields": [ # [Optional] Describes nested fields when type is RECORD.
220 # Object with schema name: TableFieldSchema
221 ],
222 "type": "A String", # [Required] Data type of the field.
223 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
224 "name": "A String", # [Required] Name of the field.
225 },
226 ],
227 },
228 }</pre>
229</div>
230
231<div class="method">
232 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
233 <pre>Lists all tables in the specified dataset.
234
235Args:
236 projectId: string, Project ID of the tables to list (required)
237 datasetId: string, Dataset ID of the tables to list (required)
238 pageToken: string, Page token, returned by a previous call, to request the next page of results
239 maxResults: integer, Maximum number of results to return
240
241Returns:
242 An object of the form:
243
244 {
245 "nextPageToken": "A String", # A token to request the next page of results.
246 "tables": [ # Tables in the requested dataset.
247 {
248 "friendlyName": "A String", # The user-friendly name for this table.
249 "kind": "bigquery#table", # The resource type.
250 "id": "A String", # An opaque ID of the table
251 "tableReference": { # A reference uniquely identifying the table.
252 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
253 "tableId": "A String", # [Required] ID of the table.
254 "datasetId": "A String", # [Required] ID of the dataset containing the table.
255 },
256 },
257 ],
258 "kind": "bigquery#tableList", # The type of list.
259 "etag": "A String", # A hash of this page of results.
260 "totalItems": 42, # The total number of tables in the dataset.
261 }</pre>
262</div>
263
264<div class="method">
265 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
266 <pre>Retrieves the next page of results.
267
268Args:
269 previous_request: The request for the previous page. (required)
270 previous_response: The response from the request for the previous page. (required)
271
272Returns:
273 A request object that you can call 'execute()' on to request the next
274 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500275 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -0400276</div>
277
278<div class="method">
279 <code class="details" id="patch">patch(projectId, datasetId, tableId, body)</code>
280 <pre>Updates information in an existing table, specified by tableId. This method supports patch semantics.
281
282Args:
283 projectId: string, Project ID of the table to update (required)
284 datasetId: string, Dataset ID of the table to update (required)
285 tableId: string, Table ID of the table to update (required)
286 body: object, The request body. (required)
287 The object takes the form of:
288
289{
290 "kind": "bigquery#table", # [Output-only] The type of the resource.
291 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
292 "description": "A String", # [Optional] A user-friendly description of this table.
293 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
294 "tableReference": { # [Required] Reference describing the ID of this table.
295 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
296 "tableId": "A String", # [Required] ID of the table.
297 "datasetId": "A String", # [Required] ID of the dataset containing the table.
298 },
299 "numRows": "A String", # [Output-only] The number of rows of data in this table.
300 "numBytes": "A String", # [Output-only] The size of the table in bytes.
301 "etag": "A String", # [Output-only] A hash of this resource.
302 "friendlyName": "A String", # [Optional] A descriptive name for this table.
303 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
304 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
305 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
306 "schema": { # [Optional] Describes the schema of this table.
307 "fields": [ # Describes the fields in a table.
308 {
309 "fields": [ # [Optional] Describes nested fields when type is RECORD.
310 # Object with schema name: TableFieldSchema
311 ],
312 "type": "A String", # [Required] Data type of the field.
313 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
314 "name": "A String", # [Required] Name of the field.
315 },
316 ],
317 },
318 }
319
320
321Returns:
322 An object of the form:
323
324 {
325 "kind": "bigquery#table", # [Output-only] The type of the resource.
326 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
327 "description": "A String", # [Optional] A user-friendly description of this table.
328 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
329 "tableReference": { # [Required] Reference describing the ID of this table.
330 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
331 "tableId": "A String", # [Required] ID of the table.
332 "datasetId": "A String", # [Required] ID of the dataset containing the table.
333 },
334 "numRows": "A String", # [Output-only] The number of rows of data in this table.
335 "numBytes": "A String", # [Output-only] The size of the table in bytes.
336 "etag": "A String", # [Output-only] A hash of this resource.
337 "friendlyName": "A String", # [Optional] A descriptive name for this table.
338 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
339 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
340 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
341 "schema": { # [Optional] Describes the schema of this table.
342 "fields": [ # Describes the fields in a table.
343 {
344 "fields": [ # [Optional] Describes nested fields when type is RECORD.
345 # Object with schema name: TableFieldSchema
346 ],
347 "type": "A String", # [Required] Data type of the field.
348 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
349 "name": "A String", # [Required] Name of the field.
350 },
351 ],
352 },
353 }</pre>
354</div>
355
356<div class="method">
357 <code class="details" id="update">update(projectId, datasetId, tableId, body)</code>
358 <pre>Updates information in an existing table, specified by tableId.
359
360Args:
361 projectId: string, Project ID of the table to update (required)
362 datasetId: string, Dataset ID of the table to update (required)
363 tableId: string, Table ID of the table to update (required)
364 body: object, The request body. (required)
365 The object takes the form of:
366
367{
368 "kind": "bigquery#table", # [Output-only] The type of the resource.
369 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
370 "description": "A String", # [Optional] A user-friendly description of this table.
371 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
372 "tableReference": { # [Required] Reference describing the ID of this table.
373 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
374 "tableId": "A String", # [Required] ID of the table.
375 "datasetId": "A String", # [Required] ID of the dataset containing the table.
376 },
377 "numRows": "A String", # [Output-only] The number of rows of data in this table.
378 "numBytes": "A String", # [Output-only] The size of the table in bytes.
379 "etag": "A String", # [Output-only] A hash of this resource.
380 "friendlyName": "A String", # [Optional] A descriptive name for this table.
381 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
382 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
383 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
384 "schema": { # [Optional] Describes the schema of this table.
385 "fields": [ # Describes the fields in a table.
386 {
387 "fields": [ # [Optional] Describes nested fields when type is RECORD.
388 # Object with schema name: TableFieldSchema
389 ],
390 "type": "A String", # [Required] Data type of the field.
391 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
392 "name": "A String", # [Required] Name of the field.
393 },
394 ],
395 },
396 }
397
398
399Returns:
400 An object of the form:
401
402 {
403 "kind": "bigquery#table", # [Output-only] The type of the resource.
404 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
405 "description": "A String", # [Optional] A user-friendly description of this table.
406 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
407 "tableReference": { # [Required] Reference describing the ID of this table.
408 "projectId": "A String", # [Required] ID of the project billed for storage of the table.
409 "tableId": "A String", # [Required] ID of the table.
410 "datasetId": "A String", # [Required] ID of the dataset containing the table.
411 },
412 "numRows": "A String", # [Output-only] The number of rows of data in this table.
413 "numBytes": "A String", # [Output-only] The size of the table in bytes.
414 "etag": "A String", # [Output-only] A hash of this resource.
415 "friendlyName": "A String", # [Optional] A descriptive name for this table.
416 "expirationTime": "A String", # [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
417 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
418 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
419 "schema": { # [Optional] Describes the schema of this table.
420 "fields": [ # Describes the fields in a table.
421 {
422 "fields": [ # [Optional] Describes nested fields when type is RECORD.
423 # Object with schema name: TableFieldSchema
424 ],
425 "type": "A String", # [Required] Data type of the field.
426 "mode": "A String", # [Optional] Mode of the field (whether or not it can be null. Default is NULLABLE.
427 "name": "A String", # [Required] Name of the field.
428 },
429 ],
430 },
431 }</pre>
432</div>
433
434</body></html>