|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## v0.28.0 |
| 4 | + |
| 5 | +**v0.28.0 significantly changes the interface for this package.** For examples |
| 6 | +of the differences between v0.28.0 and previous versions, see [Migrating to |
| 7 | +the BigQuery Python client library |
| 8 | +v0.28](https://cloud.google.com/bigquery/docs/python-client-migration). |
| 9 | +These changes can be summarized as follows: |
| 10 | + |
| 11 | +- Query and view operations default to the standard SQL dialect. (#4192) |
| 12 | +- Client functions related to |
| 13 | + [jobs](https://cloud.google.com/bigquery/docs/jobs-overview), like running |
| 14 | + queries, immediately start the job. |
| 15 | +- Functions to create, get, update, delete datasets and tables moved to the |
| 16 | + client class. |
| 17 | + |
| 18 | +### Fixes |
| 19 | + |
| 20 | +- Populate timeout parameter correctly for queries (#4209) |
| 21 | +- Automatically retry idempotent RPCs (#4148, #4178) |
| 22 | +- Parse timestamps in query parameters using canonical format (#3945) |
| 23 | +- Parse array parameters that contain a struct type. (#4040) |
| 24 | +- Support Sub Second Datetimes in row data (#3901, #3915, #3926), h/t @page1 |
| 25 | + |
| 26 | +### Interface changes / additions |
| 27 | + |
| 28 | +- Support external table configuration (#4182) in query jobs (#4191) and |
| 29 | + tables (#4193). |
| 30 | +- New `Row` class allows for access by integer index like a tuple, string |
| 31 | + index like a dictionary, or attribute access like an object. (#4149) |
| 32 | +- Add option for job ID generation with user-supplied prefix (#4198) |
| 33 | +- Add support for update of dataset access entries (#4197) |
| 34 | +- Add support for atomic read-modify-write of a dataset using etag (#4052) |
| 35 | +- Add support for labels to `Dataset` (#4026) |
| 36 | +- Add support for labels to `Table` (#4207) |
| 37 | +- Add `Table.streaming_buffer` property (#4161) |
| 38 | +- Add `TableReference` class (#3942) |
| 39 | +- Add `DatasetReference` class (#3938, #3942, #3993) |
| 40 | +- Add `ExtractJob.destination_uri_file_counts` property. (#3803) |
| 41 | +- Add `client.create_rows_json()` to bypass conversions on streaming writes. |
| 42 | + (#4189) |
| 43 | +- Add `client.get_job()` to get arbitrary jobs. (#3804, #4213) |
| 44 | +- Add filter to `client.list_datasets()` (#4205) |
| 45 | +- Add `QueryJob.undeclared_query_parameters` property. (#3802) |
| 46 | +- Add `QueryJob.referenced_tables` property. (#3801) |
| 47 | +- Add new scalar statistics properties to `QueryJob` (#3800) |
| 48 | +- Add `QueryJob.query_plan` property. (#3799) |
| 49 | + |
| 50 | +### Interface changes / breaking changes |
| 51 | + |
| 52 | +- Remove `client.run_async_query()`, use `client.query()` instead. (#4130) |
| 53 | +- Remove `client.run_sync_query()`, use `client.query_rows()` instead. (#4065, #4248) |
| 54 | +- Make `QueryResults` read-only. (#4094, #4144) |
| 55 | +- Make `get_query_results` private. Return rows for `QueryJob.result()` (#3883) |
| 56 | +- Move `*QueryParameter` and `UDFResource` classes to `query` module (also |
| 57 | + exposed in `bigquery` module). (#4156) |
| 58 | + |
| 59 | +#### Changes to tables |
| 60 | + |
| 61 | +- Remove `client` from `Table` class (#4159) |
| 62 | +- Remove `table.exists()` (#4145) |
| 63 | +- Move `table.list_parations` to `client.list_partitions` (#4146) |
| 64 | +- Move `table.upload_from_file` to `client.load_table_from_file` (#4136) |
| 65 | +- Move `table.update()` and `table.patch()` to `client.update_table()` (#4076) |
| 66 | +- Move `table.insert_data()` to `client.create_rows()`. Automatically |
| 67 | + generates row IDs if not supplied. (#4151, #4173) |
| 68 | +- Move `table.fetch_data()` to `client.list_rows()` (#4119, #4143) |
| 69 | +- Move `table.delete()` to `client.delete_table()` (#4066) |
| 70 | +- Move `table.create()` to `client.create_table()` (#4038, #4043) |
| 71 | +- Move `table.reload()` to `client.get_table()` (#4004) |
| 72 | +- Rename `Table.name` attribute to `Table.table_id` (#3959) |
| 73 | +- `Table` constructor takes a `TableReference` as parameter (#3997) |
| 74 | + |
| 75 | +#### Changes to datasets |
| 76 | + |
| 77 | +- Remove `client` from `Dataset` class (#4018) |
| 78 | +- Remove `dataset.exists()` (#3996) |
| 79 | +- Move `dataset.list_tables()` to `client.list_dataset_tables()` (#4013) |
| 80 | +- Move `dataset.delete()` to `client.delete_dataset()` (#4012) |
| 81 | +- Move `dataset.patch()` and `dataset.update()` to `client.update_dataset()` (#4003) |
| 82 | +- Move `dataset.create()` to `client.create_dataset()` (#3982) |
| 83 | +- Move `dataset.reload()` to `client.get_dataset()` (#3973) |
| 84 | +- Rename `Dataset.name` attribute to `Dataset.dataset_id` (#3955) |
| 85 | +- `client.dataset()` returns a `DatasetReference` instead of `Dataset`. (#3944) |
| 86 | +- Rename class: `dataset.AccessGrant -> dataset.AccessEntry`. (#3798) |
| 87 | +- `dataset.table()` returns a `TableReference` instead of a `Table` (#4014) |
| 88 | +- `Dataset` constructor takes a DatasetReference (#4036) |
| 89 | + |
| 90 | +#### Changes to jobs |
| 91 | + |
| 92 | +- Make `job.begin()` method private. (#4242) |
| 93 | +- Add `LoadJobConfig` class and modify `LoadJob` (#4103, #4137) |
| 94 | +- Add `CopyJobConfig` class and modify `CopyJob` (#4051, #4059) |
| 95 | +- Type of Job's and Query's `default_dataset` changed from `Dataset` to |
| 96 | + `DatasetReference` (#4037) |
| 97 | +- Rename `client.load_table_from_storage()` to `client.load_table_from_uri()` |
| 98 | + (#4235) |
| 99 | +- Rename `client.extract_table_to_storage` to `client.extract_table()`. |
| 100 | + Method starts the extract job immediately. (#3991, #4177) |
| 101 | +- Rename `XJob.name` to `XJob.job_id`. (#3962) |
| 102 | +- Rename job classes. `LoadTableFromStorageJob -> LoadJob` and |
| 103 | + `ExtractTableToStorageJob -> jobs.ExtractJob` (#3797) |
| 104 | + |
| 105 | +### Dependencies |
| 106 | + |
| 107 | +- Updating to `google-cloud-core ~= 0.28`, in particular, the |
| 108 | + `google-api-core` package has been moved out of `google-cloud-core`. (#4221) |
| 109 | + |
| 110 | +PyPI: https://pypi.org/project/google-cloud-bigquery/0.28.0/ |
| 111 | + |
| 112 | + |
| 113 | +## v0.27.0 |
| 114 | + |
| 115 | +- Remove client-side enum validation. (#3735) |
| 116 | +- Add `Table.row_from_mapping` helper. (#3425) |
| 117 | +- Move `google.cloud.future` to `google.api.core` (#3764) |
| 118 | +- Fix `__eq__` and `__ne__`. (#3765) |
| 119 | +- Move `google.cloud.iterator` to `google.api.core.page_iterator` (#3770) |
| 120 | +- `nullMarker` support for BigQuery Load Jobs (#3777), h/t @leondealmeida |
| 121 | +- Allow `job_id` to be explicitly specified in DB-API. (#3779) |
| 122 | +- Add support for a custom null marker. (#3776) |
| 123 | +- Add `SchemaField` serialization and deserialization. (#3786) |
| 124 | +- Add `get_query_results` method to the client. (#3838) |
| 125 | +- Poll for query completion via `getQueryResults` method. (#3844) |
| 126 | +- Allow fetching more than the first page when `max_results` is set. (#3845) |
| 127 | + |
| 128 | +PyPI: https://pypi.org/project/google-cloud-bigquery/0.27.0/ |
| 129 | + |
| 130 | +## 0.26.0 |
| 131 | + |
| 132 | +### Notable implementation changes |
| 133 | + |
| 134 | +- Using the `requests` transport attached to a Client for for resumable media |
| 135 | + (i.e. downloads and uploads) (#3705) (this relates to the `httplib2` to |
| 136 | + `requests` switch) |
| 137 | + |
| 138 | +### Interface changes / additions |
| 139 | + |
| 140 | +- Adding `autodetect` property on `LoadTableFromStorageJob` to enable schema |
| 141 | + autodetection. (#3648) |
| 142 | +- Implementing the Python Futures interface for Jobs. Call `job.result()` to |
| 143 | + wait for jobs to complete instead of polling manually on the job status. |
| 144 | + (#3626) |
| 145 | +- Adding `is_nullable` property on `SchemaField`. Can be used to check if a |
| 146 | + column is nullable. (#3620) |
| 147 | +- `job_name` argument added to `Table.upload_from_file` for setting the job |
| 148 | + ID. (#3605) |
| 149 | +- Adding `google.cloud.bigquery.dbapi` package, which implements PEP-249 |
| 150 | + DB-API specification. (#2921) |
| 151 | +- Adding `Table.view_use_legacy_sql` property. Can be used to create views |
| 152 | + with legacy or standard SQL. (#3514) |
| 153 | + |
| 154 | +### Interface changes / breaking changes |
| 155 | + |
| 156 | +- Removing `results()` method from the `QueryJob` class. Use |
| 157 | + `query_results()` instead. (#3661) |
| 158 | +- `SchemaField` is now immutable. It is also hashable so that it can be used |
| 159 | + in sets. (#3601) |
| 160 | + |
| 161 | +### Dependencies |
| 162 | + |
| 163 | +- Updating to `google-cloud-core ~= 0.26`, in particular, the underlying HTTP |
| 164 | + transport switched from `httplib2` to `requests` (#3654, #3674) |
| 165 | +- Adding dependency on `google-resumable-media` for loading BigQuery tables |
| 166 | + from local files. (#3555) |
| 167 | + |
| 168 | +### Packaging |
| 169 | + |
| 170 | +- Fix inclusion of `tests` (vs. `unit_tests`) in `MANIFEST.in` (#3552) |
| 171 | +- Updating `author_email` in `setup.py` to `[email protected]`. |
| 172 | + (#3598) |
| 173 | + |
| 174 | +PyPI: https://pypi.org/project/google-cloud-bigquery/0.26.0/ |
0 commit comments