blob: 7e18a376fd7837e2351ee7a85cd5a3242d5d677e [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.datasets.html">datasets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(projectId, datasetId, deleteContents=None)</a></code></p>
79<p class="firstline">Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.</p>
80<p class="toc_element">
81 <code><a href="#get">get(projectId, datasetId)</a></code></p>
82<p class="firstline">Returns the dataset specified by datasetID.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(projectId, body)</a></code></p>
85<p class="firstline">Creates a new empty dataset.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, all=None, pageToken=None, maxResults=None)</a></code></p>
88<p class="firstline">Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project.</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, body)</a></code></p>
94<p class="firstline">Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.</p>
95<p class="toc_element">
96 <code><a href="#update">update(projectId, datasetId, body)</a></code></p>
97<p class="firstline">Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.</p>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="delete">delete(projectId, datasetId, deleteContents=None)</code>
101 <pre>Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
102
103Args:
104 projectId: string, Project ID of the dataset being deleted (required)
105 datasetId: string, Dataset ID of dataset being deleted (required)
106 deleteContents: boolean, If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False
107</pre>
108</div>
109
110<div class="method">
111 <code class="details" id="get">get(projectId, datasetId)</code>
112 <pre>Returns the dataset specified by datasetID.
113
114Args:
115 projectId: string, Project ID of the requested dataset (required)
116 datasetId: string, Dataset ID of the requested dataset (required)
117
118Returns:
119 An object of the form:
120
121 {
122 "kind": "bigquery#dataset", # [Output-only] The resource type.
123 "description": "A String", # [Optional] A user-friendly description of the dataset.
124 "datasetReference": { # [Required] A reference that identifies the dataset.
125 "projectId": "A String", # [Optional] The ID of the container project.
126 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
127 },
128 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
129 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
130 {
131 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
132 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
133 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
134 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
135 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
136 },
137 ],
138 "etag": "A String", # [Output-only] A hash of the resource.
139 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
140 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
141 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
142 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
143 }</pre>
144</div>
145
146<div class="method">
147 <code class="details" id="insert">insert(projectId, body)</code>
148 <pre>Creates a new empty dataset.
149
150Args:
151 projectId: string, Project ID of the new dataset (required)
152 body: object, The request body. (required)
153 The object takes the form of:
154
155{
156 "kind": "bigquery#dataset", # [Output-only] The resource type.
157 "description": "A String", # [Optional] A user-friendly description of the dataset.
158 "datasetReference": { # [Required] A reference that identifies the dataset.
159 "projectId": "A String", # [Optional] The ID of the container project.
160 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
161 },
162 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
163 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
164 {
165 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
166 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
167 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
168 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
169 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
170 },
171 ],
172 "etag": "A String", # [Output-only] A hash of the resource.
173 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
174 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
175 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
176 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
177 }
178
179
180Returns:
181 An object of the form:
182
183 {
184 "kind": "bigquery#dataset", # [Output-only] The resource type.
185 "description": "A String", # [Optional] A user-friendly description of the dataset.
186 "datasetReference": { # [Required] A reference that identifies the dataset.
187 "projectId": "A String", # [Optional] The ID of the container project.
188 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
189 },
190 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
191 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
192 {
193 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
194 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
195 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
196 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
197 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
198 },
199 ],
200 "etag": "A String", # [Output-only] A hash of the resource.
201 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
202 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
203 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
204 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
205 }</pre>
206</div>
207
208<div class="method">
209 <code class="details" id="list">list(projectId, all=None, pageToken=None, maxResults=None)</code>
210 <pre>Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project.
211
212Args:
213 projectId: string, Project ID of the datasets to be listed (required)
214 all: boolean, Whether to list all datasets, including hidden ones
215 pageToken: string, Page token, returned by a previous call, to request the next page of results
216 maxResults: integer, The maximum number of results to return
217
218Returns:
219 An object of the form:
220
221 {
222 "nextPageToken": "A String", # A token that can be used to request the next results page. This property is omitted on the final results page.
223 "kind": "bigquery#datasetList", # The list type. This property always returns the value "bigquery#datasetList".
224 "datasets": [ # An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project.
225 {
226 "friendlyName": "A String", # A descriptive name for the dataset, if one exists.
227 "kind": "bigquery#dataset", # The resource type. This property always returns the value "bigquery#dataset".
228 "id": "A String", # The fully-qualified, unique, opaque ID of the dataset.
229 "datasetReference": { # The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID.
230 "projectId": "A String", # [Optional] The ID of the container project.
231 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
232 },
233 },
234 ],
235 "etag": "A String", # A hash value of the results page. You can use this property to determine if the page has changed since the last request.
236 }</pre>
237</div>
238
239<div class="method">
240 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
241 <pre>Retrieves the next page of results.
242
243Args:
244 previous_request: The request for the previous page. (required)
245 previous_response: The response from the request for the previous page. (required)
246
247Returns:
248 A request object that you can call 'execute()' on to request the next
249 page. Returns None if there are no more items in the collection.
250 </pre>
251</div>
252
253<div class="method">
254 <code class="details" id="patch">patch(projectId, datasetId, body)</code>
255 <pre>Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.
256
257Args:
258 projectId: string, Project ID of the dataset being updated (required)
259 datasetId: string, Dataset ID of the dataset being updated (required)
260 body: object, The request body. (required)
261 The object takes the form of:
262
263{
264 "kind": "bigquery#dataset", # [Output-only] The resource type.
265 "description": "A String", # [Optional] A user-friendly description of the dataset.
266 "datasetReference": { # [Required] A reference that identifies the dataset.
267 "projectId": "A String", # [Optional] The ID of the container project.
268 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
269 },
270 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
271 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
272 {
273 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
274 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
275 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
276 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
277 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
278 },
279 ],
280 "etag": "A String", # [Output-only] A hash of the resource.
281 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
282 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
283 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
284 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
285 }
286
287
288Returns:
289 An object of the form:
290
291 {
292 "kind": "bigquery#dataset", # [Output-only] The resource type.
293 "description": "A String", # [Optional] A user-friendly description of the dataset.
294 "datasetReference": { # [Required] A reference that identifies the dataset.
295 "projectId": "A String", # [Optional] The ID of the container project.
296 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
297 },
298 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
299 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
300 {
301 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
302 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
303 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
304 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
305 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
306 },
307 ],
308 "etag": "A String", # [Output-only] A hash of the resource.
309 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
310 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
311 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
312 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
313 }</pre>
314</div>
315
316<div class="method">
317 <code class="details" id="update">update(projectId, datasetId, body)</code>
318 <pre>Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.
319
320Args:
321 projectId: string, Project ID of the dataset being updated (required)
322 datasetId: string, Dataset ID of the dataset being updated (required)
323 body: object, The request body. (required)
324 The object takes the form of:
325
326{
327 "kind": "bigquery#dataset", # [Output-only] The resource type.
328 "description": "A String", # [Optional] A user-friendly description of the dataset.
329 "datasetReference": { # [Required] A reference that identifies the dataset.
330 "projectId": "A String", # [Optional] The ID of the container project.
331 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
332 },
333 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
334 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
335 {
336 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
337 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
338 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
339 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
340 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
341 },
342 ],
343 "etag": "A String", # [Output-only] A hash of the resource.
344 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
345 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
346 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
347 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
348 }
349
350
351Returns:
352 An object of the form:
353
354 {
355 "kind": "bigquery#dataset", # [Output-only] The resource type.
356 "description": "A String", # [Optional] A user-friendly description of the dataset.
357 "datasetReference": { # [Required] A reference that identifies the dataset.
358 "projectId": "A String", # [Optional] The ID of the container project.
359 "datasetId": "A String", # [Required] A unique ID for this dataset, without the project name.
360 },
361 "creationTime": "A String", # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
362 "access": [ # [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
363 {
364 "specialGroup": "A String", # [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.
365 "domain": "A String", # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
366 "role": "A String", # [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.
367 "groupByEmail": "A String", # [Pick one] An email address of a Google Group to grant access to.
368 "userByEmail": "A String", # [Pick one] An email address of a user to grant access to. For example: fred@example.com.
369 },
370 ],
371 "etag": "A String", # [Output-only] A hash of the resource.
372 "friendlyName": "A String", # [Optional] A descriptive name for the dataset.
373 "lastModifiedTime": "A String", # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
374 "id": "A String", # [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
375 "selfLink": "A String", # [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
376 }</pre>
377</div>
378
379</body></html>