blob: 4f88a5e9c7a332ef7cde667268d13d034f2f546a [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040081 <code><a href="#delete">delete(projectId, datasetId, deleteContents=None)</a></code></p>
82<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>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, datasetId)</a></code></p>
85<p class="firstline">Returns the dataset specified by datasetID.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(projectId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Creates a new empty dataset.</p>
89<p class="toc_element">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080090 <code><a href="#list">list(projectId, pageToken=None, all=None, maxResults=None, filter=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000091<p class="firstline">Lists all datasets in the specified project to which you have been granted the READER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(projectId, datasetId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040097<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>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#update">update(projectId, datasetId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<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>
101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="close">close()</code>
104 <pre>Close httplib2 connections.</pre>
105</div>
106
107<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400108 <code class="details" id="delete">delete(projectId, datasetId, deleteContents=None)</code>
109 <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.
110
111Args:
112 projectId: string, Project ID of the dataset being deleted (required)
113 datasetId: string, Dataset ID of dataset being deleted (required)
114 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
115</pre>
116</div>
117
118<div class="method">
119 <code class="details" id="get">get(projectId, datasetId)</code>
120 <pre>Returns the dataset specified by datasetID.
121
122Args:
123 projectId: string, Project ID of the requested dataset (required)
124 datasetId: string, Dataset ID of the requested dataset (required)
125
126Returns:
127 An object of the form:
128
129 {
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800130 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
131 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700132 &quot;access&quot;: [ # [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;
133 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800134 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800135 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
136 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
137 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
138 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
139 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
140 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
141 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
142 },
143 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800144 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
145 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
146 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
147 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
148 },
149 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700150 },
151 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800152 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
153 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
154 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
155 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
156 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700157 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
159 &quot;a_key&quot;: &quot;A String&quot;,
160 },
161 &quot;defaultEncryptionConfiguration&quot;: {
162 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
163 },
164 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
165 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
166 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700167 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700168 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800169 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700170 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800171 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700172 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400173</div>
174
175<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 <code class="details" id="insert">insert(projectId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400177 <pre>Creates a new empty dataset.
178
179Args:
180 projectId: string, Project ID of the new dataset (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400182 The object takes the form of:
183
184{
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800185 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
186 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700187 &quot;access&quot;: [ # [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;
188 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800189 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800190 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
191 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
192 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
193 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
194 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
195 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
196 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
197 },
198 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800199 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
200 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
201 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
202 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
203 },
204 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700205 },
206 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800207 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
208 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
209 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
210 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
211 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700212 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800213 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
214 &quot;a_key&quot;: &quot;A String&quot;,
215 },
216 &quot;defaultEncryptionConfiguration&quot;: {
217 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
218 },
219 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
220 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
221 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700222 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700223 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800224 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800226 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700227 }
John Asmuth614db982014-04-24 15:46:26 -0400228
John Asmuth614db982014-04-24 15:46:26 -0400229
230Returns:
231 An object of the form:
232
233 {
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800234 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
235 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700236 &quot;access&quot;: [ # [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;
237 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800238 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800239 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
240 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
241 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
242 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
243 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
244 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
245 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
246 },
247 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800248 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
249 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
250 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
251 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
252 },
253 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700254 },
255 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800256 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
257 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
258 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
259 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
260 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700261 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800262 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
263 &quot;a_key&quot;: &quot;A String&quot;,
264 },
265 &quot;defaultEncryptionConfiguration&quot;: {
266 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
267 },
268 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
269 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
270 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700271 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700272 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800273 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700274 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800275 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700276 }</pre>
277</div>
278
279<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800280 <code class="details" id="list">list(projectId, pageToken=None, all=None, maxResults=None, filter=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700281 <pre>Lists all datasets in the specified project to which you have been granted the READER dataset role.
282
283Args:
284 projectId: string, Project ID of the datasets to be listed (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800285 pageToken: string, Page token, returned by a previous call, to request the next page of results
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700286 all: boolean, Whether to list all datasets, including hidden ones
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700287 maxResults: integer, The maximum number of results to return
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800288 filter: string, An expression for filtering the results of the request by label. The syntax is &quot;labels.&lt;name&gt;[:&lt;value&gt;]&quot;. Multiple filters can be ANDed together by connecting with a space. Example: &quot;labels.department:receiving labels.active&quot;. See Filtering datasets using labels for details.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700289
290Returns:
291 An object of the form:
292
293 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 &quot;datasets&quot;: [ # 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.
John Asmuth614db982014-04-24 15:46:26 -0400295 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700296 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the data resides.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800297 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # The resource type. This property always returns the value &quot;bigquery#dataset&quot;.
298 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets.
299 &quot;a_key&quot;: &quot;A String&quot;,
300 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800301 &quot;datasetReference&quot;: { # The dataset reference. Use this property to access specific parts of the dataset&#x27;s ID, such as project ID or dataset ID.
302 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
303 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
304 },
305 &quot;id&quot;: &quot;A String&quot;, # The fully-qualified, unique, opaque ID of the dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800306 &quot;friendlyName&quot;: &quot;A String&quot;, # A descriptive name for the dataset, if one exists.
John Asmuth614db982014-04-24 15:46:26 -0400307 },
308 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800309 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be used to request the next results page. This property is omitted on the final results page.
310 &quot;kind&quot;: &quot;bigquery#datasetList&quot;, # The list type. This property always returns the value &quot;bigquery#datasetList&quot;.
311 &quot;etag&quot;: &quot;A String&quot;, # A hash value of the results page. You can use this property to determine if the page has changed since the last request.
John Asmuth614db982014-04-24 15:46:26 -0400312 }</pre>
313</div>
314
315<div class="method">
316 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
317 <pre>Retrieves the next page of results.
318
319Args:
320 previous_request: The request for the previous page. (required)
321 previous_response: The response from the request for the previous page. (required)
322
323Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400325 page. Returns None if there are no more items in the collection.
326 </pre>
327</div>
328
329<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 <code class="details" id="patch">patch(projectId, datasetId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400331 <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.
332
333Args:
334 projectId: string, Project ID of the dataset being updated (required)
335 datasetId: string, Dataset ID of the dataset being updated (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400337 The object takes the form of:
338
339{
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800340 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
341 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700342 &quot;access&quot;: [ # [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;
343 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800344 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800345 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
346 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
347 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
348 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
349 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
350 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
351 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
352 },
353 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800354 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
355 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
356 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
357 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
358 },
359 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700360 },
361 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800362 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
363 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
364 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
365 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
366 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700367 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800368 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
369 &quot;a_key&quot;: &quot;A String&quot;,
370 },
371 &quot;defaultEncryptionConfiguration&quot;: {
372 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
373 },
374 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
375 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
376 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700377 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800379 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800381 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 }
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700383
384
385Returns:
386 An object of the form:
387
388 {
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800389 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
390 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700391 &quot;access&quot;: [ # [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;
392 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800393 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800394 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
395 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
396 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
397 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
398 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
399 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
400 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
401 },
402 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800403 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
404 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
405 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
406 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
407 },
408 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700409 },
410 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800411 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
412 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
413 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
414 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
415 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700416 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800417 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
418 &quot;a_key&quot;: &quot;A String&quot;,
419 },
420 &quot;defaultEncryptionConfiguration&quot;: {
421 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
422 },
423 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
424 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
425 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700426 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700427 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800428 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700429 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800430 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700431 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400432</div>
433
434<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 <code class="details" id="update">update(projectId, datasetId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400436 <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.
437
438Args:
439 projectId: string, Project ID of the dataset being updated (required)
440 datasetId: string, Dataset ID of the dataset being updated (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400442 The object takes the form of:
443
444{
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800445 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
446 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700447 &quot;access&quot;: [ # [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;
448 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800449 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800450 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
451 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
452 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
453 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
454 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
455 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
456 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
457 },
458 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800459 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
460 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
461 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
462 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
463 },
464 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700465 },
466 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800467 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
468 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
469 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
470 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
471 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700472 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800473 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
474 &quot;a_key&quot;: &quot;A String&quot;,
475 },
476 &quot;defaultEncryptionConfiguration&quot;: {
477 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
478 },
479 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
480 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
481 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700482 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700483 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800484 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800486 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700487 }
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700488
489
490Returns:
491 An object of the form:
492
493 {
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800494 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for the dataset.
495 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700496 &quot;access&quot;: [ # [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;
497 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800498 &quot;userByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member &quot;user:EMAIL&quot; or &quot;serviceAccount:EMAIL&quot;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800499 &quot;specialGroup&quot;: &quot;A String&quot;, # [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. Maps to similarly-named IAM members.
500 &quot;iamMember&quot;: &quot;A String&quot;, # [Pick one] Some other type of member that appears in the IAM Policy but isn&#x27;t a user, group, domain, or special group.
501 &quot;domain&quot;: &quot;A String&quot;, # [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: &quot;example.com&quot;. Maps to IAM policy member &quot;domain:DOMAIN&quot;.
502 &quot;routine&quot;: { # [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
503 &quot;routineId&quot;: &quot;A String&quot;, # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
504 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this routine.
505 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this routine.
506 },
507 &quot;groupByEmail&quot;: &quot;A String&quot;, # [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member &quot;group:GROUP&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800508 &quot;view&quot;: { # [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
509 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
510 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
511 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
512 },
513 &quot;role&quot;: &quot;A String&quot;, # [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to &quot;roles/bigquery.dataOwner&quot;, it will be returned back as &quot;OWNER&quot;.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700514 },
515 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800516 &quot;satisfiesPZS&quot;: True or False, # [Output-only] Reserved for future use.
517 &quot;selfLink&quot;: &quot;A String&quot;, # [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.
518 &quot;kind&quot;: &quot;bigquery#dataset&quot;, # [Output-only] The resource type.
519 &quot;defaultPartitionExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
520 &quot;id&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700521 &quot;location&quot;: &quot;A String&quot;, # The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800522 &quot;labels&quot;: { # The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
523 &quot;a_key&quot;: &quot;A String&quot;,
524 },
525 &quot;defaultEncryptionConfiguration&quot;: {
526 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
527 },
528 &quot;defaultTableExpirationMs&quot;: &quot;A String&quot;, # [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table&#x27;s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
529 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the resource.
530 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700531 &quot;datasetReference&quot;: { # [Required] A reference that identifies the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700532 &quot;projectId&quot;: &quot;A String&quot;, # [Optional] The ID of the project containing this dataset.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800533 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800535 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700536 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400537</div>
538
539</body></html>