You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix!: remove out-of-date BigQuery ML protocol buffers (#1178)
deps!: BigQuery Storage and pyarrow are required dependencies (#776)
fix!: use nullable `Int64` and `boolean` dtypes in `to_dataframe` (#786)
feat!: destination tables are no-longer removed by `create_job` (#891)
feat!: In `to_dataframe`, use `dbdate` and `dbtime` dtypes from db-dtypes package for BigQuery DATE and TIME columns (#972)
fix!: automatically convert out-of-bounds dates in `to_dataframe`, remove `date_as_object` argument (#972)
feat!: mark the package as type-checked (#1058)
feat!: default to DATETIME type when loading timezone-naive datetimes from Pandas (#1061)
feat: add `api_method` parameter to `Client.query` to select `INSERT` or `QUERY` API (#967)
fix: improve type annotations for mypy validation (#1081)
feat: use `StandardSqlField` class for `Model.feature_columns` and `Model.label_columns` (#1117)
docs: Add migration guide from version 2.x to 3.x (#1027)
Release-As: 3.0.0
## Changes to data types loading a pandas DataFrame
150
+
151
+
In the absence of schema information, pandas columns with naive
152
+
`datetime64[ns]` values, i.e. without timezone information, are recognized and
153
+
loaded using the `DATETIME` type. On the other hand, for columns with
154
+
timezone-aware `datetime64[ns, UTC]` values, the `TIMESTAMP` type is continued
155
+
to be used.
156
+
157
+
## Changes to `Model`, `Client.get_model`, `Client.update_model`, and `Client.list_models`
158
+
159
+
The types of several `Model` properties have been changed.
160
+
161
+
-`Model.feature_columns` now returns a sequence of `google.cloud.bigquery.standard_sql.StandardSqlField`.
162
+
-`Model.label_columns` now returns a sequence of `google.cloud.bigquery.standard_sql.StandardSqlField`.
163
+
-`Model.model_type` now returns a string.
164
+
-`Model.training_runs` now returns a sequence of dictionaries, as recieved from the [BigQuery REST API](https://cloud.google.com/bigquery/docs/reference/rest/v2/models#Model.FIELDS.training_runs).
165
+
166
+
<aname="legacy-protobuf-types"></a>
167
+
## Legacy Protocol Buffers Types
168
+
169
+
For compatibility reasons, the legacy proto-based types still exists as static code
170
+
and can be imported:
171
+
172
+
```py
173
+
from google.cloud.bigquery_v2 import Model # a sublcass of proto.Message
174
+
```
175
+
176
+
Mind, however, that importing them will issue a warning, because aside from
177
+
being importable, these types **are not maintained anymore**. They may differ
178
+
both from the types in `google.cloud.bigquery`, and from the types supported on
179
+
the backend.
180
+
181
+
### Maintaining compatibility with `google-cloud-bigquery` version 2.0
182
+
183
+
If you maintain a library or system that needs to support both
184
+
`google-cloud-bigquery` version 2.x and 3.x, it is recommended that you detect
185
+
when version 2.x is in use and convert properties that use the legacy protocol
186
+
buffer types, such as `Model.training_runs`, into the types used in 3.x.
0 commit comments