Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
53aad82
chore(main): release 3.12.0 (#1642)
release-please[bot] Oct 3, 2023
a95a3c8
feat: add support for Dataset.isCaseInsensitive
joseignaciorc Oct 3, 2023
36e039d
Merge branch 'main' into feat/case-sensitivity-for-datasets
joseignaciorc Oct 3, 2023
40ba859
docs: revised `create_partitioned_table` sample (#1447)
thejaredchapman Oct 5, 2023
b8c9276
docs: revised relax column mode sample (#1467)
thejaredchapman Oct 5, 2023
924e081
chore: [autoapprove] bump cryptography from 41.0.3 to 41.0.4 (#1666)
gcf-owl-bot[bot] Oct 7, 2023
faa50b9
chore: [autoapprove] Update `black` and `isort` to latest versions (#…
gcf-owl-bot[bot] Oct 10, 2023
5ceed05
feat: add `Model.transform_columns` property (#1661)
SalemJorden Oct 12, 2023
a47a555
tests: add unit tests for dataset.is_case_insensitive
joseignaciorc Oct 14, 2023
cefadd5
docs: improve comments for dataset.is_case_sensitive (code and tests)
joseignaciorc Oct 14, 2023
f637e5e
chore: consolidate PyarrowVersions helpers (#1679)
Linchin Oct 18, 2023
8f187e6
chore: rename rst files to avoid conflict with service names (#1689)
gcf-owl-bot[bot] Oct 19, 2023
5f02050
Merge branch 'main' into feat/case-sensitivity-for-datasets
Linchin Oct 19, 2023
819309b
docs: improve docstring of is_case_insensitive
joseignaciorc Oct 19, 2023
a40d7ae
fix: AccessEntry API representation parsing (#1682)
jonathan-ostrander Oct 19, 2023
2dded33
docs: remove redundant `bigquery_update_table_expiration` code sample…
tswast Oct 19, 2023
345e06e
chore: increasing Shapely dependency upper bound (#1696)
nayaknishant Oct 23, 2023
76d0e5a
chore: benchmark revamp (#1694)
Linchin Oct 23, 2023
e8da978
chore: refactor BigQueryStorageVersions (#1699)
Linchin Oct 26, 2023
dfe1886
chore: upgrade mypy (#1705)
Linchin Oct 27, 2023
5734cbf
chore(samples): Update snippets.py to dedupe region tags (#1701)
meredithslota Oct 27, 2023
83bc768
feat: add support for dataset.default_rounding_mode (#1688)
Gaurang033 Oct 28, 2023
c2d95e3
chore(deps): bump urllib3 from 1.26.15 to 1.26.18 in /samples/geograp…
dependabot[bot] Oct 30, 2023
49bfd12
chore(main): release 3.13.0 (#1676)
release-please[bot] Oct 30, 2023
f22eff2
feat: add support dataset.max_time_travel_hours (#1683)
Gaurang033 Oct 31, 2023
e5a666e
Merge branch 'main' into feat/case-sensitivity-for-datasets
Linchin Nov 1, 2023
852b03e
Update tests/system/test_client.py
Linchin Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7
# created: 2023-08-02T10:53:29.114535628Z
digest: sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99
# created: 2023-10-18T20:26:37.410353675Z
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ docs.metadata

# Virtual environment
env/
venv/

# Test logs
coverage.xml
Expand Down
55 changes: 28 additions & 27 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,30 +113,30 @@ commonmark==0.9.1 \
--hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \
--hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9
# via rich
cryptography==41.0.3 \
--hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \
--hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \
--hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \
--hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \
--hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \
--hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \
--hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \
--hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \
--hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \
--hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \
--hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \
--hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \
--hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \
--hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \
--hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \
--hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \
--hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \
--hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \
--hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \
--hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \
--hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \
--hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \
--hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de
cryptography==41.0.4 \
--hash=sha256:004b6ccc95943f6a9ad3142cfabcc769d7ee38a3f60fb0dddbfb431f818c3a67 \
--hash=sha256:047c4603aeb4bbd8db2756e38f5b8bd7e94318c047cfe4efeb5d715e08b49311 \
--hash=sha256:0d9409894f495d465fe6fda92cb70e8323e9648af912d5b9141d616df40a87b8 \
--hash=sha256:23a25c09dfd0d9f28da2352503b23e086f8e78096b9fd585d1d14eca01613e13 \
--hash=sha256:2ed09183922d66c4ec5fdaa59b4d14e105c084dd0febd27452de8f6f74704143 \
--hash=sha256:35c00f637cd0b9d5b6c6bd11b6c3359194a8eba9c46d4e875a3660e3b400005f \
--hash=sha256:37480760ae08065437e6573d14be973112c9e6dcaf5f11d00147ee74f37a3829 \
--hash=sha256:3b224890962a2d7b57cf5eeb16ccaafba6083f7b811829f00476309bce2fe0fd \
--hash=sha256:5a0f09cefded00e648a127048119f77bc2b2ec61e736660b5789e638f43cc397 \
--hash=sha256:5b72205a360f3b6176485a333256b9bcd48700fc755fef51c8e7e67c4b63e3ac \
--hash=sha256:7e53db173370dea832190870e975a1e09c86a879b613948f09eb49324218c14d \
--hash=sha256:7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a \
--hash=sha256:80907d3faa55dc5434a16579952ac6da800935cd98d14dbd62f6f042c7f5e839 \
--hash=sha256:86defa8d248c3fa029da68ce61fe735432b047e32179883bdb1e79ed9bb8195e \
--hash=sha256:8ac4f9ead4bbd0bc8ab2d318f97d85147167a488be0e08814a37eb2f439d5cf6 \
--hash=sha256:93530900d14c37a46ce3d6c9e6fd35dbe5f5601bf6b3a5c325c7bffc030344d9 \
--hash=sha256:9eeb77214afae972a00dee47382d2591abe77bdae166bda672fb1e24702a3860 \
--hash=sha256:b5f4dfe950ff0479f1f00eda09c18798d4f49b98f4e2006d644b3301682ebdca \
--hash=sha256:c3391bd8e6de35f6f1140e50aaeb3e2b3d6a9012536ca23ab0d9c35ec18c8a91 \
--hash=sha256:c880eba5175f4307129784eca96f4e70b88e57aa3f680aeba3bab0e980b0f37d \
--hash=sha256:cecfefa17042941f94ab54f769c8ce0fe14beff2694e9ac684176a2535bf9714 \
--hash=sha256:e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb \
--hash=sha256:efc8ad4e6fc4f1752ebfb58aefece8b4e3c4cae940b0994d43649bdfce8d0d4f
# via
# gcp-releasetool
# secretstorage
Expand Down Expand Up @@ -382,6 +382,7 @@ protobuf==3.20.3 \
# gcp-docuploader
# gcp-releasetool
# google-api-core
# googleapis-common-protos
pyasn1==0.4.8 \
--hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \
--hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba
Expand Down Expand Up @@ -466,9 +467,9 @@ typing-extensions==4.4.0 \
--hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \
--hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e
# via -r requirements.in
urllib3==1.26.12 \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
urllib3==1.26.18 \
--hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \
--hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0
# via
# requests
# twine
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@
[1]: https://pypi.org/project/google-cloud-bigquery/#history


## [3.13.0](https://github.com/googleapis/python-bigquery/compare/v3.12.0...v3.13.0) (2023-10-30)


### Features

* Add `Model.transform_columns` property ([#1661](https://github.com/googleapis/python-bigquery/issues/1661)) ([5ceed05](https://github.com/googleapis/python-bigquery/commit/5ceed056482f6d1f2fc45e7e6b84382de45c85ed))
* Add support for dataset.default_rounding_mode ([#1688](https://github.com/googleapis/python-bigquery/issues/1688)) ([83bc768](https://github.com/googleapis/python-bigquery/commit/83bc768b90a852d258a4805603020a296e02d2f9))


### Bug Fixes

* AccessEntry API representation parsing ([#1682](https://github.com/googleapis/python-bigquery/issues/1682)) ([a40d7ae](https://github.com/googleapis/python-bigquery/commit/a40d7ae03149708fc34c962b43a6ac198780b6aa))


### Documentation

* Remove redundant `bigquery_update_table_expiration` code sample ([#1673](https://github.com/googleapis/python-bigquery/issues/1673)) ([2dded33](https://github.com/googleapis/python-bigquery/commit/2dded33626b3de6c4ab5e1229eb4c85786b2ff53))
* Revised `create_partitioned_table` sample ([#1447](https://github.com/googleapis/python-bigquery/issues/1447)) ([40ba859](https://github.com/googleapis/python-bigquery/commit/40ba859059c3e463e17ea7781bc5a9aff8244c5d))
* Revised relax column mode sample ([#1467](https://github.com/googleapis/python-bigquery/issues/1467)) ([b8c9276](https://github.com/googleapis/python-bigquery/commit/b8c9276be011d971b941b583fd3d4417d438067f))

## [3.12.0](https://github.com/googleapis/python-bigquery/compare/v3.11.4...v3.12.0) (2023-10-02)


### Features

* Add `Dataset.storage_billing_model` setter, use `client.update_dataset(ds, fields=["storage_billing_model"])` to update ([#1643](https://github.com/googleapis/python-bigquery/issues/1643)) ([5deba50](https://github.com/googleapis/python-bigquery/commit/5deba50b8c2d91d08bd5f5fb68742268c494b4a9))
* Search statistics ([#1616](https://github.com/googleapis/python-bigquery/issues/1616)) ([b930e46](https://github.com/googleapis/python-bigquery/commit/b930e4673b0d1cceb53f683e47578d87af9361f3))
* Widen retry predicate to include ServiceUnavailable ([#1641](https://github.com/googleapis/python-bigquery/issues/1641)) ([3e021a4](https://github.com/googleapis/python-bigquery/commit/3e021a46d387a0e3cb69913a281062fc221bb926))


### Bug Fixes

* Allow `storage_billing_model` to be explicitly set to `None` to use project default value ([#1665](https://github.com/googleapis/python-bigquery/issues/1665)) ([514d3e1](https://github.com/googleapis/python-bigquery/commit/514d3e12e5131bd589dff08893fd89bf40338ba3))
* Relax timeout expectations ([#1645](https://github.com/googleapis/python-bigquery/issues/1645)) ([1760e94](https://github.com/googleapis/python-bigquery/commit/1760e945d16163980027fecf21113cd77ddc35a1))
* Use isinstance() per E721, unpin flake8 ([#1659](https://github.com/googleapis/python-bigquery/issues/1659)) ([54a7769](https://github.com/googleapis/python-bigquery/commit/54a77694afcd80be4ba469c6ebb7ca8be112b04e))


### Documentation

* Revise update_table_expiration sample ([#1457](https://github.com/googleapis/python-bigquery/issues/1457)) ([03194e0](https://github.com/googleapis/python-bigquery/commit/03194e0156ed9201cb36301967c5af117d7ef29c))

## [3.11.4](https://github.com/googleapis/python-bigquery/compare/v3.11.3...v3.11.4) (2023-07-19)


Expand Down
128 changes: 124 additions & 4 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,128 @@
# BigQuery Benchmark
This directory contains benchmarks for BigQuery client.
This directory contains benchmark scripts for BigQuery client. It is created primarily for project
maintainers to measure library performance.

## Usage
`python benchmark.py queries.json`
`python benchmark.py`

BigQuery service caches requests so the benchmark should be run
at least twice, disregarding the first result.

### Flags
Run `python benchmark.py -h` for detailed information on available flags.

`--reruns` can be used to override the default number of times a query is rerun. Must be a positive
integer. Default value is 3.

`--projectid` can be used to run benchmarks in a different project. If unset, the GOOGLE_CLOUD_PROJECT
environment variable is used.

`--queryfile` can be used to override the default file which contains queries to be instrumented.

`--table` can be used to specify a table to which benchmarking results should be streamed. The format
for this string is in BigQuery standard SQL notation without escapes, e.g. `projectid.datasetid.tableid`

`--create_table` can be used to have the benchmarking tool create the destination table prior to streaming.

`--tag` allows arbitrary key:value pairs to be set. This flag can be specified multiple times.

When `--create_table` flag is set, must also specify the name of the new table using `--table`.

### Example invocations

Setting all the flags
```
python benchmark.py \
--reruns 5 \
--projectid test_project_id \
--table logging_project_id.querybenchmarks.measurements \
--create_table \
--tag source:myhostname \
--tag somekeywithnovalue \
--tag experiment:special_environment_thing
```

Or, a more realistic invocation using shell substitions:
```
python benchmark.py \
--reruns 5 \
--table $BENCHMARK_TABLE \
--tag origin:$(hostname) \
--tag branch:$(git branch --show-current) \
--tag latestcommit:$(git log --pretty=format:'%H' -n 1)
```

## Stream Results To A BigQuery Table

When streaming benchmarking results to a BigQuery table, the table schema is as follows:
```
[
{
"name": "groupname",
"type": "STRING"
},
{
"name": "name",
"type": "STRING"
},
{
"name": "tags",
"type": "RECORD",
"mode": "REPEATED",
"fields": [
{
"name": "key",
"type": "STRING"
},
{
"name": "value",
"type": "STRING"
}
]
},
{
"name": "SQL",
"type": "STRING"
},
{
"name": "runs",
"type": "RECORD",
"mode": "REPEATED",
"fields": [
{
"name": "errorstring",
"type": "STRING"
},
{
"name": "start_time",
"type": "TIMESTAMP"
},
{
"name": "query_end_time",
"type": "TIMESTAMP"
},
{
"name": "first_row_returned_time",
"type": "TIMESTAMP"
},
{
"name": "all_rows_returned_time",
"type": "TIMESTAMP"
},
{
"name": "total_rows",
"type": "INTEGER"
}
]
},
{
"name": "event_time",
"type": "TIMESTAMP"
}
]
```

The table schema is the same as the [benchmark in go](https://github.com/googleapis/google-cloud-go/tree/main/bigquery/benchmarks),
so results from both languages can be streamed to the same table.

## BigQuery Benchmarks In Other Languages
* Go: https://github.com/googleapis/google-cloud-go/tree/main/bigquery/benchmarks
* JAVA: https://github.com/googleapis/java-bigquery/tree/main/benchmark
Loading