blob: b4b1a31957303fa0d6a33908e04acbef51c33474 [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.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>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000088<p class="firstline">Lists all tables in the specified dataset. Requires the READER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<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. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. 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. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.</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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700127 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
128 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
129 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
130 "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 (',').
131 "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.
132 "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.
133 "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.
134 "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.
135 "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.
136 },
137 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
138 "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.
139 "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
140 "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.
141 "A String",
142 ],
143 "schema": { # [Required] The schema for the data.
144 "fields": [ # Describes the fields in a table.
145 {
146 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
147 # Object with schema name: TableFieldSchema
148 ],
149 "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).
150 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
151 "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.
152 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
153 },
154 ],
155 },
156 },
John Asmuth614db982014-04-24 15:46:26 -0400157 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800158 "projectId": "A String", # [Required] The ID of the project containing this table.
159 "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.
160 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400161 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700162 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
163 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400164 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700165 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
166 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
167 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
168 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
169 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
170 },
John Asmuth614db982014-04-24 15:46:26 -0400171 "friendlyName": "A String", # [Optional] A descriptive name for this table.
172 "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.
173 "view": { # [Optional] The view definition.
174 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
175 },
176 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
177 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
178 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
179 "schema": { # [Optional] Describes the schema of this table.
180 "fields": [ # Describes the fields in a table.
181 {
182 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
183 # Object with schema name: TableFieldSchema
184 ],
185 "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 -0800186 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
187 "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 -0400188 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
189 },
190 ],
191 },
192 }</pre>
193</div>
194
195<div class="method">
196 <code class="details" id="insert">insert(projectId, datasetId, body)</code>
197 <pre>Creates a new, empty table in the dataset.
198
199Args:
200 projectId: string, Project ID of the new table (required)
201 datasetId: string, Dataset ID of the new table (required)
202 body: object, The request body. (required)
203 The object takes the form of:
204
205{
206 "kind": "bigquery#table", # [Output-only] The type of the resource.
207 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
208 "description": "A String", # [Optional] A user-friendly description of this table.
209 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700210 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
211 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
212 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
213 "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 (',').
214 "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.
215 "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.
216 "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.
217 "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.
218 "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.
219 },
220 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
221 "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.
222 "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
223 "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.
224 "A String",
225 ],
226 "schema": { # [Required] The schema for the data.
227 "fields": [ # Describes the fields in a table.
228 {
229 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
230 # Object with schema name: TableFieldSchema
231 ],
232 "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).
233 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
234 "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.
235 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
236 },
237 ],
238 },
239 },
John Asmuth614db982014-04-24 15:46:26 -0400240 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800241 "projectId": "A String", # [Required] The ID of the project containing this table.
242 "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.
243 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400244 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700245 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
246 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400247 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700248 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
249 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
250 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
251 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
252 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
253 },
John Asmuth614db982014-04-24 15:46:26 -0400254 "friendlyName": "A String", # [Optional] A descriptive name for this table.
255 "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.
256 "view": { # [Optional] The view definition.
257 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
258 },
259 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
260 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
261 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
262 "schema": { # [Optional] Describes the schema of this table.
263 "fields": [ # Describes the fields in a table.
264 {
265 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
266 # Object with schema name: TableFieldSchema
267 ],
268 "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 -0800269 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
270 "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 -0400271 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
272 },
273 ],
274 },
275 }
276
277
278Returns:
279 An object of the form:
280
281 {
282 "kind": "bigquery#table", # [Output-only] The type of the resource.
283 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
284 "description": "A String", # [Optional] A user-friendly description of this table.
285 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700286 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
287 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
288 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
289 "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 (',').
290 "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.
291 "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.
292 "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.
293 "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.
294 "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.
295 },
296 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
297 "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.
298 "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
299 "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.
300 "A String",
301 ],
302 "schema": { # [Required] The schema for the data.
303 "fields": [ # Describes the fields in a table.
304 {
305 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
306 # Object with schema name: TableFieldSchema
307 ],
308 "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).
309 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
310 "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.
311 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
312 },
313 ],
314 },
315 },
John Asmuth614db982014-04-24 15:46:26 -0400316 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800317 "projectId": "A String", # [Required] The ID of the project containing this table.
318 "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.
319 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400320 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700321 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
322 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400323 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700324 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
325 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
326 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
327 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
328 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
329 },
John Asmuth614db982014-04-24 15:46:26 -0400330 "friendlyName": "A String", # [Optional] A descriptive name for this table.
331 "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.
332 "view": { # [Optional] The view definition.
333 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
334 },
335 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
336 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
337 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
338 "schema": { # [Optional] Describes the schema of this table.
339 "fields": [ # Describes the fields in a table.
340 {
341 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
342 # Object with schema name: TableFieldSchema
343 ],
344 "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 -0800345 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
346 "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 -0400347 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
348 },
349 ],
350 },
351 }</pre>
352</div>
353
354<div class="method">
355 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000356 <pre>Lists all tables in the specified dataset. Requires the READER dataset role.
John Asmuth614db982014-04-24 15:46:26 -0400357
358Args:
359 projectId: string, Project ID of the tables to list (required)
360 datasetId: string, Dataset ID of the tables to list (required)
361 pageToken: string, Page token, returned by a previous call, to request the next page of results
362 maxResults: integer, Maximum number of results to return
363
364Returns:
365 An object of the form:
366
367 {
368 "nextPageToken": "A String", # A token to request the next page of results.
369 "tables": [ # Tables in the requested dataset.
370 {
371 "friendlyName": "A String", # The user-friendly name for this table.
372 "kind": "bigquery#table", # The resource type.
373 "type": "A String", # The type of table. Possible values are: TABLE, VIEW.
374 "id": "A String", # An opaque ID of the table
375 "tableReference": { # A reference uniquely identifying the table.
Craig Citroe633be12015-03-02 13:40:36 -0800376 "projectId": "A String", # [Required] The ID of the project containing this table.
377 "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.
378 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400379 },
380 },
381 ],
382 "kind": "bigquery#tableList", # The type of list.
383 "etag": "A String", # A hash of this page of results.
384 "totalItems": 42, # The total number of tables in the dataset.
385 }</pre>
386</div>
387
388<div class="method">
389 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
390 <pre>Retrieves the next page of results.
391
392Args:
393 previous_request: The request for the previous page. (required)
394 previous_response: The response from the request for the previous page. (required)
395
396Returns:
397 A request object that you can call 'execute()' on to request the next
398 page. Returns None if there are no more items in the collection.
399 </pre>
400</div>
401
402<div class="method">
403 <code class="details" id="patch">patch(projectId, datasetId, tableId, body)</code>
404 <pre>Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.
405
406Args:
407 projectId: string, Project ID of the table to update (required)
408 datasetId: string, Dataset ID of the table to update (required)
409 tableId: string, Table ID of the table to update (required)
410 body: object, The request body. (required)
411 The object takes the form of:
412
413{
414 "kind": "bigquery#table", # [Output-only] The type of the resource.
415 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
416 "description": "A String", # [Optional] A user-friendly description of this table.
417 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700418 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
419 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
420 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
421 "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 (',').
422 "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.
423 "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.
424 "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.
425 "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.
426 "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.
427 },
428 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
429 "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.
430 "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
431 "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.
432 "A String",
433 ],
434 "schema": { # [Required] The schema for the data.
435 "fields": [ # Describes the fields in a table.
436 {
437 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
438 # Object with schema name: TableFieldSchema
439 ],
440 "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).
441 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
442 "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.
443 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
444 },
445 ],
446 },
447 },
John Asmuth614db982014-04-24 15:46:26 -0400448 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800449 "projectId": "A String", # [Required] The ID of the project containing this table.
450 "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.
451 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400452 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700453 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
454 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400455 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700456 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
457 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
458 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
459 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
460 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
461 },
John Asmuth614db982014-04-24 15:46:26 -0400462 "friendlyName": "A String", # [Optional] A descriptive name for this table.
463 "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.
464 "view": { # [Optional] The view definition.
465 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
466 },
467 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
468 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
469 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
470 "schema": { # [Optional] Describes the schema of this table.
471 "fields": [ # Describes the fields in a table.
472 {
473 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
474 # Object with schema name: TableFieldSchema
475 ],
476 "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 -0800477 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
478 "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 -0400479 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
480 },
481 ],
482 },
483 }
484
485
486Returns:
487 An object of the form:
488
489 {
490 "kind": "bigquery#table", # [Output-only] The type of the resource.
491 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
492 "description": "A String", # [Optional] A user-friendly description of this table.
493 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700494 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
495 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
496 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
497 "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 (',').
498 "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.
499 "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.
500 "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.
501 "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.
502 "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.
503 },
504 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
505 "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.
506 "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
507 "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.
508 "A String",
509 ],
510 "schema": { # [Required] The schema for the data.
511 "fields": [ # Describes the fields in a table.
512 {
513 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
514 # Object with schema name: TableFieldSchema
515 ],
516 "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).
517 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
518 "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.
519 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
520 },
521 ],
522 },
523 },
John Asmuth614db982014-04-24 15:46:26 -0400524 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800525 "projectId": "A String", # [Required] The ID of the project containing this table.
526 "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.
527 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400528 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700529 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
530 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400531 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700532 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
533 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
534 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
535 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
536 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
537 },
John Asmuth614db982014-04-24 15:46:26 -0400538 "friendlyName": "A String", # [Optional] A descriptive name for this table.
539 "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.
540 "view": { # [Optional] The view definition.
541 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
542 },
543 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
544 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
545 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
546 "schema": { # [Optional] Describes the schema of this table.
547 "fields": [ # Describes the fields in a table.
548 {
549 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
550 # Object with schema name: TableFieldSchema
551 ],
552 "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 -0800553 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
554 "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 -0400555 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
556 },
557 ],
558 },
559 }</pre>
560</div>
561
562<div class="method">
563 <code class="details" id="update">update(projectId, datasetId, tableId, body)</code>
564 <pre>Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.
565
566Args:
567 projectId: string, Project ID of the table to update (required)
568 datasetId: string, Dataset ID of the table to update (required)
569 tableId: string, Table ID of the table to update (required)
570 body: object, The request body. (required)
571 The object takes the form of:
572
573{
574 "kind": "bigquery#table", # [Output-only] The type of the resource.
575 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
576 "description": "A String", # [Optional] A user-friendly description of this table.
577 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700578 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
579 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
580 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
581 "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 (',').
582 "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.
583 "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.
584 "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.
585 "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.
586 "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.
587 },
588 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
589 "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.
590 "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
591 "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.
592 "A String",
593 ],
594 "schema": { # [Required] The schema for the data.
595 "fields": [ # Describes the fields in a table.
596 {
597 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
598 # Object with schema name: TableFieldSchema
599 ],
600 "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).
601 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
602 "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.
603 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
604 },
605 ],
606 },
607 },
John Asmuth614db982014-04-24 15:46:26 -0400608 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800609 "projectId": "A String", # [Required] The ID of the project containing this table.
610 "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.
611 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400612 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700613 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
614 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400615 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700616 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
617 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
618 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
619 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
620 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
621 },
John Asmuth614db982014-04-24 15:46:26 -0400622 "friendlyName": "A String", # [Optional] A descriptive name for this table.
623 "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.
624 "view": { # [Optional] The view definition.
625 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
626 },
627 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
628 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
629 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
630 "schema": { # [Optional] Describes the schema of this table.
631 "fields": [ # Describes the fields in a table.
632 {
633 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
634 # Object with schema name: TableFieldSchema
635 ],
636 "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 -0800637 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
638 "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 -0400639 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
640 },
641 ],
642 },
643 }
644
645
646Returns:
647 An object of the form:
648
649 {
650 "kind": "bigquery#table", # [Output-only] The type of the resource.
651 "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
652 "description": "A String", # [Optional] A user-friendly description of this table.
653 "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700654 "externalDataConfiguration": { # [Experimental] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
655 "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
656 "csvOptions": { # Additional properties to set if sourceFormat is set to CSV.
657 "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 (',').
658 "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.
659 "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.
660 "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.
661 "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.
662 "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.
663 },
664 "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
665 "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.
666 "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
667 "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.
668 "A String",
669 ],
670 "schema": { # [Required] The schema for the data.
671 "fields": [ # Describes the fields in a table.
672 {
673 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
674 # Object with schema name: TableFieldSchema
675 ],
676 "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).
677 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
678 "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.
679 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
680 },
681 ],
682 },
683 },
John Asmuth614db982014-04-24 15:46:26 -0400684 "tableReference": { # [Required] Reference describing the ID of this table.
Craig Citroe633be12015-03-02 13:40:36 -0800685 "projectId": "A String", # [Required] The ID of the project containing this table.
686 "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.
687 "datasetId": "A String", # [Required] The ID of the dataset containing this table.
John Asmuth614db982014-04-24 15:46:26 -0400688 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700689 "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
690 "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
John Asmuth614db982014-04-24 15:46:26 -0400691 "etag": "A String", # [Output-only] A hash of this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700692 "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
693 "streamingBuffer": { # [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
694 "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
695 "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
696 "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
697 },
John Asmuth614db982014-04-24 15:46:26 -0400698 "friendlyName": "A String", # [Optional] A descriptive name for this table.
699 "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.
700 "view": { # [Optional] The view definition.
701 "query": "A String", # [Required] A query that BigQuery executes when the view is referenced.
702 },
703 "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE.
704 "id": "A String", # [Output-only] An opaque ID uniquely identifying the table.
705 "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again.
706 "schema": { # [Optional] Describes the schema of this table.
707 "fields": [ # Describes the fields in a table.
708 {
709 "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
710 # Object with schema name: TableFieldSchema
711 ],
712 "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 -0800713 "description": "A String", # [Optional] The field description. The maximum length is 16K characters.
714 "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 -0400715 "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
716 },
717 ],
718 },
719 }</pre>
720</div>
721
722</body></html>