This is the release candidate for v1.0.0.
- Add
delete_contentstodelete_dataset. (#4724)
- Add handling of missing properties in
SchemaField.from_api_repr(). (#4754) - Fix missing return value in
LoadJobConfig.from_api_repr. (#4727)
- Minor documentation and typo fixes. (#4782, #4718, #4784, #4835, #4836)
- Add
to_dataframe()method to row iterators. When Pandas is installed this method returns aDataFramecontaining the query's or table's rows. (#4354) - Iterate over a
QueryJobto wait for and get the query results. (#4350) - Add
Table.referenceandDataset.referenceproperties to get theTableReferenceorDatasetReferencecorresponding to thatTableorDataset, respectively. (#4405) - Add
Row.keys(),Row.items(), andRow.get(). This makesRowact more like a built-in dictionary. (#4393, #4413)
- Add
Client.insert_rows()andClient.insert_rows_json(), deprecateClient.create_rows()andClient.create_rows_json(). (#4657) - Add
Client.list_tables, deprecateClient.list_dataset_tables. (#4653) Client.list_tablesreturns an iterators ofTableListItem. The API only returns a subset of properties of a table when listing. (#4427)- Remove
QueryJob.query_results(). UseQueryJob.result()instead. (#4652) - Remove
Client.query_rows(). UseClient.query()instead. (#4429) Client.list_datasetsreturns an iterator ofDatasetListItem. The API only returns a subset of properties of a dataset when listing. (#4439)
0.28.0 significantly changes the interface for this package. For examples of the differences between 0.28.0 and previous versions, see Migrating to the BigQuery Python client library 0.28. These changes can be summarized as follows:
- Query and view operations default to the standard SQL dialect. (#4192)
- Client functions related to jobs, like running queries, immediately start the job.
- Functions to create, get, update, delete datasets and tables moved to the client class.
- Populate timeout parameter correctly for queries (#4209)
- Automatically retry idempotent RPCs (#4148, #4178)
- Parse timestamps in query parameters using canonical format (#3945)
- Parse array parameters that contain a struct type. (#4040)
- Support Sub Second Datetimes in row data (#3901, #3915, #3926), h/t @page1
- Support external table configuration (#4182) in query jobs (#4191) and tables (#4193).
- New
Rowclass allows for access by integer index like a tuple, string index like a dictionary, or attribute access like an object. (#4149) - Add option for job ID generation with user-supplied prefix (#4198)
- Add support for update of dataset access entries (#4197)
- Add support for atomic read-modify-write of a dataset using etag (#4052)
- Add support for labels to
Dataset(#4026) - Add support for labels to
Table(#4207) - Add
Table.streaming_bufferproperty (#4161) - Add
TableReferenceclass (#3942) - Add
DatasetReferenceclass (#3938, #3942, #3993) - Add
ExtractJob.destination_uri_file_countsproperty. (#3803) - Add
client.create_rows_json()to bypass conversions on streaming writes. (#4189) - Add
client.get_job()to get arbitrary jobs. (#3804, #4213) - Add filter to
client.list_datasets()(#4205) - Add
QueryJob.undeclared_query_parametersproperty. (#3802) - Add
QueryJob.referenced_tablesproperty. (#3801) - Add new scalar statistics properties to
QueryJob(#3800) - Add
QueryJob.query_planproperty. (#3799)
- Remove
client.run_async_query(), useclient.query()instead. (#4130) - Remove
client.run_sync_query(), useclient.query_rows()instead. (#4065, #4248) - Make
QueryResultsread-only. (#4094, #4144) - Make
get_query_resultsprivate. Return rows forQueryJob.result()(#3883) - Move
*QueryParameterandUDFResourceclasses toquerymodule (also exposed inbigquerymodule). (#4156)
- Remove
clientfromTableclass (#4159) - Remove
table.exists()(#4145) - Move
table.list_parationstoclient.list_partitions(#4146) - Move
table.upload_from_filetoclient.load_table_from_file(#4136) - Move
table.update()andtable.patch()toclient.update_table()(#4076) - Move
table.insert_data()toclient.create_rows(). Automatically generates row IDs if not supplied. (#4151, #4173) - Move
table.fetch_data()toclient.list_rows()(#4119, #4143) - Move
table.delete()toclient.delete_table()(#4066) - Move
table.create()toclient.create_table()(#4038, #4043) - Move
table.reload()toclient.get_table()(#4004) - Rename
Table.nameattribute toTable.table_id(#3959) Tableconstructor takes aTableReferenceas parameter (#3997)
- Remove
clientfromDatasetclass (#4018) - Remove
dataset.exists()(#3996) - Move
dataset.list_tables()toclient.list_dataset_tables()(#4013) - Move
dataset.delete()toclient.delete_dataset()(#4012) - Move
dataset.patch()anddataset.update()toclient.update_dataset()(#4003) - Move
dataset.create()toclient.create_dataset()(#3982) - Move
dataset.reload()toclient.get_dataset()(#3973) - Rename
Dataset.nameattribute toDataset.dataset_id(#3955) client.dataset()returns aDatasetReferenceinstead ofDataset. (#3944)- Rename class:
dataset.AccessGrant -> dataset.AccessEntry. (#3798) dataset.table()returns aTableReferenceinstead of aTable(#4014)Datasetconstructor takes a DatasetReference (#4036)
- Make
job.begin()method private. (#4242) - Add
LoadJobConfigclass and modifyLoadJob(#4103, #4137) - Add
CopyJobConfigclass and modifyCopyJob(#4051, #4059) - Type of Job's and Query's
default_datasetchanged fromDatasettoDatasetReference(#4037) - Rename
client.load_table_from_storage()toclient.load_table_from_uri()(#4235) - Rename
client.extract_table_to_storagetoclient.extract_table(). Method starts the extract job immediately. (#3991, #4177) - Rename
XJob.nametoXJob.job_id. (#3962) - Rename job classes.
LoadTableFromStorageJob -> LoadJobandExtractTableToStorageJob -> jobs.ExtractJob(#3797)
- Updating to
google-cloud-core ~= 0.28, in particular, thegoogle-api-corepackage has been moved out ofgoogle-cloud-core. (#4221)
PyPI: https://pypi.org/project/google-cloud-bigquery/0.28.0/
- Remove client-side enum validation. (#3735)
- Add
Table.row_from_mappinghelper. (#3425) - Move
google.cloud.futuretogoogle.api.core(#3764) - Fix
__eq__and__ne__. (#3765) - Move
google.cloud.iteratortogoogle.api.core.page_iterator(#3770) nullMarkersupport for BigQuery Load Jobs (#3777), h/t @leondealmeida- Allow
job_idto be explicitly specified in DB-API. (#3779) - Add support for a custom null marker. (#3776)
- Add
SchemaFieldserialization and deserialization. (#3786) - Add
get_query_resultsmethod to the client. (#3838) - Poll for query completion via
getQueryResultsmethod. (#3844) - Allow fetching more than the first page when
max_resultsis set. (#3845)
PyPI: https://pypi.org/project/google-cloud-bigquery/0.27.0/
- Using the
requeststransport attached to a Client for for resumable media (i.e. downloads and uploads) (#3705) (this relates to thehttplib2torequestsswitch)
- Adding
autodetectproperty onLoadTableFromStorageJobto enable schema autodetection. (#3648) - Implementing the Python Futures interface for Jobs. Call
job.result()to wait for jobs to complete instead of polling manually on the job status. (#3626) - Adding
is_nullableproperty onSchemaField. Can be used to check if a column is nullable. (#3620) job_nameargument added toTable.upload_from_filefor setting the job ID. (#3605)- Adding
google.cloud.bigquery.dbapipackage, which implements PEP-249 DB-API specification. (#2921) - Adding
Table.view_use_legacy_sqlproperty. Can be used to create views with legacy or standard SQL. (#3514)
- Removing
results()method from theQueryJobclass. Usequery_results()instead. (#3661) SchemaFieldis now immutable. It is also hashable so that it can be used in sets. (#3601)
- Updating to
google-cloud-core ~= 0.26, in particular, the underlying HTTP transport switched fromhttplib2torequests(#3654, #3674) - Adding dependency on
google-resumable-mediafor loading BigQuery tables from local files. (#3555)
- Fix inclusion of
tests(vs.unit_tests) inMANIFEST.in(#3552) - Updating
author_emailinsetup.pytogoogleapis-publisher@google.com. (#3598)
PyPI: https://pypi.org/project/google-cloud-bigquery/0.26.0/