Commit 059fd9a
committed
feat: Add UpdateMode to update_dataset
This commit introduces the `UpdateMode` enum and integrates it into the
`update_dataset` method in the BigQuery client.
The `UpdateMode` enum allows you to specify which parts of a dataset
should be updated (metadata, ACL, or full update).
The following changes were made:
- Defined the `UpdateMode` enum in `google/cloud/bigquery/enums.py`
with values: `UPDATE_MODE_UNSPECIFIED`, `UPDATE_METADATA`,
`UPDATE_ACL`, and `UPDATE_FULL`.
- Modified the `update_dataset` method in
`google/cloud/bigquery/client.py` to accept an optional
`update_mode` parameter. This parameter is added to the query
parameters if provided.
- Added unit tests in `tests/unit/test_client.py` to verify the
correct handling of the `update_mode` parameter, including
testing all enum values and the default case where it's not
provided.1 parent d92b487 commit 059fd9a
File tree
3 files changed
+73
-0
lines changed- google/cloud/bigquery
- tests/unit
3 files changed
+73
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1198 | 1198 | | |
1199 | 1199 | | |
1200 | 1200 | | |
| 1201 | + | |
1201 | 1202 | | |
1202 | 1203 | | |
1203 | 1204 | | |
| |||
1249 | 1250 | | |
1250 | 1251 | | |
1251 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1252 | 1256 | | |
1253 | 1257 | | |
1254 | 1258 | | |
| |||
1259 | 1263 | | |
1260 | 1264 | | |
1261 | 1265 | | |
| 1266 | + | |
1262 | 1267 | | |
1263 | 1268 | | |
1264 | 1269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
412 | 430 | | |
413 | 431 | | |
414 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2114 | 2114 | | |
2115 | 2115 | | |
2116 | 2116 | | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2117 | 2167 | | |
2118 | 2168 | | |
2119 | 2169 | | |
| |||
0 commit comments