diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index bff46cd669..dc05a72762 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -1,4 +1,4 @@
-# Copyright 2023 Google LLC
+# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:11d59eabd49dc088f8339fb96e9da79ba4b3a73b3d49a8a4e0263e91edd053ba
-# created: 2023-12-05T18:46:43.811070085Z
\ No newline at end of file
+ digest: sha256:a6aa751984f1e905c3ae5a3aac78fc7b68210626ce91487dc7ff4f0a06f010cc
+# created: 2024-01-22T14:14:20.913785597Z
diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml
new file mode 100644
index 0000000000..87d8eb2be8
--- /dev/null
+++ b/.github/workflows/renovate_config_check.yaml
@@ -0,0 +1,25 @@
+name: Renovate Bot Config Validation
+
+on:
+ pull_request:
+ paths:
+ - 'renovate.json'
+
+jobs:
+ renovate_bot_config_validation:
+ runs-on: ubuntu-22.04
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20'
+
+ - name: Install Renovate and Config Validator
+ run: |
+ npm install -g npm@latest
+ npm install --global renovate
+ renovate-config-validator
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index c7f7f64aaa..6584155eee 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
+ uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: SARIF file
path: results.sarif
@@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@03e7845b7bfcd5e7fb63d1ae8c61b0e791134fab # v2.22.11
+ uses: github/codeql-action/upload-sarif@4759df8df70c5ebe7042c3029bbace20eee13edd # v2.23.1
with:
sarif_file: results.sarif
diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt
index 6a36ccab46..445c5c1f09 100644
--- a/.kokoro/requirements.txt
+++ b/.kokoro/requirements.txt
@@ -170,30 +170,30 @@ colorlog==6.7.0 \
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
# via gcp-docuploader
-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.6 \
+ --hash=sha256:068bc551698c234742c40049e46840843f3d98ad7ce265fd2bd4ec0d11306596 \
+ --hash=sha256:0f27acb55a4e77b9be8d550d762b0513ef3fc658cd3eb15110ebbcbd626db12c \
+ --hash=sha256:2132d5865eea673fe6712c2ed5fb4fa49dba10768bb4cc798345748380ee3660 \
+ --hash=sha256:3288acccef021e3c3c10d58933f44e8602cf04dba96d9796d70d537bb2f4bbc4 \
+ --hash=sha256:35f3f288e83c3f6f10752467c48919a7a94b7d88cc00b0668372a0d2ad4f8ead \
+ --hash=sha256:398ae1fc711b5eb78e977daa3cbf47cec20f2c08c5da129b7a296055fbb22aed \
+ --hash=sha256:422e3e31d63743855e43e5a6fcc8b4acab860f560f9321b0ee6269cc7ed70cc3 \
+ --hash=sha256:48783b7e2bef51224020efb61b42704207dde583d7e371ef8fc2a5fb6c0aabc7 \
+ --hash=sha256:4d03186af98b1c01a4eda396b137f29e4e3fb0173e30f885e27acec8823c1b09 \
+ --hash=sha256:5daeb18e7886a358064a68dbcaf441c036cbdb7da52ae744e7b9207b04d3908c \
+ --hash=sha256:60e746b11b937911dc70d164060d28d273e31853bb359e2b2033c9e93e6f3c43 \
+ --hash=sha256:742ae5e9a2310e9dade7932f9576606836ed174da3c7d26bc3d3ab4bd49b9f65 \
+ --hash=sha256:7e00fb556bda398b99b0da289ce7053639d33b572847181d6483ad89835115f6 \
+ --hash=sha256:85abd057699b98fce40b41737afb234fef05c67e116f6f3650782c10862c43da \
+ --hash=sha256:8efb2af8d4ba9dbc9c9dd8f04d19a7abb5b49eab1f3694e7b5a16a5fc2856f5c \
+ --hash=sha256:ae236bb8760c1e55b7a39b6d4d32d2279bc6c7c8500b7d5a13b6fb9fc97be35b \
+ --hash=sha256:afda76d84b053923c27ede5edc1ed7d53e3c9f475ebaf63c68e69f1403c405a8 \
+ --hash=sha256:b27a7fd4229abef715e064269d98a7e2909ebf92eb6912a9603c7e14c181928c \
+ --hash=sha256:b648fe2a45e426aaee684ddca2632f62ec4613ef362f4d681a9a6283d10e079d \
+ --hash=sha256:c5a550dc7a3b50b116323e3d376241829fd326ac47bc195e04eb33a8170902a9 \
+ --hash=sha256:da46e2b5df770070412c46f87bac0849b8d685c5f2679771de277a422c7d0b86 \
+ --hash=sha256:f39812f70fc5c71a15aa3c97b2bbe213c3f2a460b79bd21c40d033bb34a9bf36 \
+ --hash=sha256:ff369dd19e8fe0528b02e8df9f2aeb2479f89b1270d90f96a63500afe9af5cae
# via
# gcp-releasetool
# secretstorage
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88197b2c12..ea4a0271a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,32 @@
# Changelog
+## [2.37.0](https://github.com/googleapis/java-bigquery/compare/v2.36.0...v2.37.0) (2024-01-25)
+
+
+### Features
+
+* Add support for Table resource tags ([#3046](https://github.com/googleapis/java-bigquery/issues/3046)) ([7d61111](https://github.com/googleapis/java-bigquery/commit/7d61111d23282c7e2478ac31ba0d4e423330ec92))
+* Add universe domain ([#3090](https://github.com/googleapis/java-bigquery/issues/3090)) ([b2814a2](https://github.com/googleapis/java-bigquery/commit/b2814a2f8e6601347d0489058e563878af40f301))
+
+
+### Dependencies
+
+* Update actions/upload-artifact action to v4.1.0 ([#3071](https://github.com/googleapis/java-bigquery/issues/3071)) ([3fbb2bb](https://github.com/googleapis/java-bigquery/commit/3fbb2bba7ad7bca245a8ca5eb59d999aead29ebd))
+* Update actions/upload-artifact action to v4.2.0 ([#3081](https://github.com/googleapis/java-bigquery/issues/3081)) ([af81354](https://github.com/googleapis/java-bigquery/commit/af81354c342cdb2a790cb008fc9fe3460e62265b))
+* Update actions/upload-artifact action to v4.3.0 ([#3091](https://github.com/googleapis/java-bigquery/issues/3091)) ([f4411b0](https://github.com/googleapis/java-bigquery/commit/f4411b09c4b681d2f3fb250ef133b291649f2865))
+* Update arrow.version to v15 ([#3084](https://github.com/googleapis/java-bigquery/issues/3084)) ([4d4cbae](https://github.com/googleapis/java-bigquery/commit/4d4cbae00028f84c071f51e88d7ee976efdf04d5))
+* Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.35.0 ([#3066](https://github.com/googleapis/java-bigquery/issues/3066)) ([48cdaa8](https://github.com/googleapis/java-bigquery/commit/48cdaa8a77935062cfe9ed8fb66f52f774bdd673))
+* Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.36.0 ([#3093](https://github.com/googleapis/java-bigquery/issues/3093)) ([24456a3](https://github.com/googleapis/java-bigquery/commit/24456a361a39550e962ac68a79de3c7a9e912884))
+* Update dependency com.google.apis:google-api-services-bigquery to v2-rev20240105-2.0.0 ([#3073](https://github.com/googleapis/java-bigquery/issues/3073)) ([f371d67](https://github.com/googleapis/java-bigquery/commit/f371d6709109acf07224ee0b2615de400fd90838))
+* Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.39.0 ([#3067](https://github.com/googleapis/java-bigquery/issues/3067)) ([6ff4f04](https://github.com/googleapis/java-bigquery/commit/6ff4f043905a6fe67bc3ed5cbbacc0f9eddd3172))
+* Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.40.0 ([#3094](https://github.com/googleapis/java-bigquery/issues/3094)) ([110bcc5](https://github.com/googleapis/java-bigquery/commit/110bcc506272b372fdd90ee718fad298c8ab7e19))
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.22.0 ([#3080](https://github.com/googleapis/java-bigquery/issues/3080)) ([a5b119c](https://github.com/googleapis/java-bigquery/commit/a5b119cdf6f8ce9d180a2d51a3a7a9aad50b1ea4))
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.23.0 ([#3096](https://github.com/googleapis/java-bigquery/issues/3096)) ([0933b34](https://github.com/googleapis/java-bigquery/commit/0933b34f30ade216dcf61767a771509ca07f294b))
+* Update dependency com.google.oauth-client:google-oauth-client-java6 to v1.35.0 ([#3078](https://github.com/googleapis/java-bigquery/issues/3078)) ([2614df2](https://github.com/googleapis/java-bigquery/commit/2614df203b1f3c9800b8c8c23d32e7f22ec76253))
+* Update dependency com.google.oauth-client:google-oauth-client-jetty to v1.35.0 ([#3079](https://github.com/googleapis/java-bigquery/issues/3079)) ([f03c4fc](https://github.com/googleapis/java-bigquery/commit/f03c4fc957ae5665fe0f98c0f06cc80eea7cec59))
+* Update github/codeql-action action to v2.23.0 ([#3061](https://github.com/googleapis/java-bigquery/issues/3061)) ([0fbdfba](https://github.com/googleapis/java-bigquery/commit/0fbdfba1aecf18567fae95aea133b6504f050bd5))
+* Update github/codeql-action action to v2.23.1 ([#3077](https://github.com/googleapis/java-bigquery/issues/3077)) ([e3f417c](https://github.com/googleapis/java-bigquery/commit/e3f417cec3bdd81040baac3f054d0270dde9d9f8))
+
## [2.36.0](https://github.com/googleapis/java-bigquery/compare/v2.35.0...v2.36.0) (2024-01-10)
diff --git a/README.md b/README.md
index 0a5c250aec..9614c18ddf 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-bigquery
- 2.35.0
+ 2.36.0
```
@@ -53,20 +53,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.29.0')
+implementation platform('com.google.cloud:libraries-bom:26.30.0')
implementation 'com.google.cloud:google-cloud-bigquery'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-bigquery:2.35.0'
+implementation 'com.google.cloud:google-cloud-bigquery:2.36.0'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.35.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.36.0"
```
@@ -351,7 +351,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquery/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquery.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.35.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.36.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 4041a1b706..54c64e8e41 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -6,7 +6,7 @@
google-cloud-bigquery-parent
com.google.cloud
- 2.36.0
+ 2.37.0
diff --git a/google-cloud-bigquery/clirr-ignored-differences.xml b/google-cloud-bigquery/clirr-ignored-differences.xml
index 7513b53240..9c69fd6a68 100644
--- a/google-cloud-bigquery/clirr-ignored-differences.xml
+++ b/google-cloud-bigquery/clirr-ignored-differences.xml
@@ -29,6 +29,11 @@
com/google/cloud/bigquery/RoutineInfo*
*RemoteFunctionOptions(*)
+
+ 7013
+ com/google/cloud/bigquery/TableInfo*
+ *ResourceTags(*)
+
7012
com/google/cloud/bigquery/Connection
diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml
index d7e1519367..c59d4be0d5 100644
--- a/google-cloud-bigquery/pom.xml
+++ b/google-cloud-bigquery/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-bigquery
- 2.36.0
+ 2.37.0
jar
BigQuery
https://github.com/googleapis/java-bigquery
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-bigquery-parent
- 2.36.0
+ 2.37.0
google-cloud-bigquery
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Labels.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Annotations.java
similarity index 87%
rename from google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Labels.java
rename to google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Annotations.java
index 8f91aa37ae..5d8d1e7e0c 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Labels.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Annotations.java
@@ -28,9 +28,9 @@
import javax.annotation.Nullable;
@AutoValue
-abstract class Labels implements Serializable {
+abstract class Annotations implements Serializable {
private static final long serialVersionUID = 1L;
- static final Labels ZERO = of(Collections.emptyMap());
+ static final Annotations ZERO = of(Collections.emptyMap());
@Nullable
abstract Map userMap();
@@ -59,13 +59,13 @@ Map toPb() {
return Collections.unmodifiableMap(pbMap);
}
- private static Labels of(Map userMap) {
+ private static Annotations of(Map userMap) {
Preconditions.checkArgument(
userMap == null || !userMap.containsKey(null), "null keys are not supported");
- return new AutoValue_Labels(userMap);
+ return new AutoValue_Annotations(userMap);
}
- static Labels fromUser(Map map) {
+ static Annotations fromUser(Map map) {
if (map == null || map instanceof ImmutableMap) {
return of(map);
}
@@ -73,7 +73,7 @@ static Labels fromUser(Map map) {
return of(Collections.unmodifiableMap(new HashMap<>(map)));
}
- static Labels fromPb(Map pb) {
+ static Annotations fromPb(Map pb) {
if (Data.isNull(pb)) {
return of(null);
}
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetInfo.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetInfo.java
index 0dddc0e86f..b5fabe97d1 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetInfo.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetInfo.java
@@ -69,7 +69,7 @@ public Dataset apply(DatasetInfo datasetInfo) {
private final Long lastModified;
private final String location;
private final String selfLink;
- private final Labels labels;
+ private final Annotations labels;
private final EncryptionConfiguration defaultEncryptionConfiguration;
private final Long defaultPartitionExpirationMs;
private final String defaultCollation;
@@ -194,7 +194,7 @@ static final class BuilderImpl extends Builder {
private Long lastModified;
private String location;
private String selfLink;
- private Labels labels = Labels.ZERO;
+ private Annotations labels = Annotations.ZERO;
private EncryptionConfiguration defaultEncryptionConfiguration;
private Long defaultPartitionExpirationMs;
private String defaultCollation;
@@ -247,7 +247,7 @@ public Acl apply(Dataset.Access accessPb) {
this.lastModified = datasetPb.getLastModifiedTime();
this.location = datasetPb.getLocation();
this.selfLink = datasetPb.getSelfLink();
- this.labels = Labels.fromPb(datasetPb.getLabels());
+ this.labels = Annotations.fromPb(datasetPb.getLabels());
if (datasetPb.getDefaultEncryptionConfiguration() != null) {
this.defaultEncryptionConfiguration =
new EncryptionConfiguration.Builder(datasetPb.getDefaultEncryptionConfiguration())
@@ -337,7 +337,7 @@ Builder setSelfLink(String selfLink) {
*/
@Override
public Builder setLabels(Map labels) {
- this.labels = Labels.fromUser(labels);
+ this.labels = Annotations.fromUser(labels);
return this;
}
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ModelInfo.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ModelInfo.java
index 83603cbd23..922ed441c8 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ModelInfo.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ModelInfo.java
@@ -67,7 +67,7 @@ public Model apply(ModelInfo ModelInfo) {
private final Long creationTime;
private final Long lastModifiedTime;
private final Long expirationTime;
- private final Labels labels;
+ private final Annotations labels;
private final String location;
private final ImmutableList trainingRunList;
private final ImmutableList featureColumnList;
@@ -132,7 +132,7 @@ static class BuilderImpl extends Builder {
private Long creationTime;
private Long lastModifiedTime;
private Long expirationTime;
- private Labels labels = Labels.ZERO;
+ private Annotations labels = Annotations.ZERO;
private String location;
private List trainingRunList = Collections.emptyList();
private List labelColumnList = Collections.emptyList();
@@ -169,7 +169,7 @@ static class BuilderImpl extends Builder {
this.creationTime = modelPb.getCreationTime();
this.lastModifiedTime = modelPb.getLastModifiedTime();
this.expirationTime = modelPb.getExpirationTime();
- this.labels = Labels.fromPb(modelPb.getLabels());
+ this.labels = Annotations.fromPb(modelPb.getLabels());
this.location = modelPb.getLocation();
if (modelPb.getTrainingRuns() != null) {
this.trainingRunList = modelPb.getTrainingRuns();
@@ -238,7 +238,7 @@ public Builder setModelId(ModelId modelId) {
@Override
public Builder setLabels(Map labels) {
- this.labels = Labels.fromUser(labels);
+ this.labels = Annotations.fromUser(labels);
return this;
}
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
index fdf0bad668..56c6558555 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
@@ -192,6 +192,12 @@ public Builder setLabels(Map labels) {
return this;
}
+ @Override
+ public Builder setResourceTags(Map resourceTags) {
+ infoBuilder.setResourceTags(resourceTags);
+ return this;
+ }
+
@Override
public Builder setRequirePartitionFilter(Boolean requirePartitionFilter) {
infoBuilder.setRequirePartitionFilter(requirePartitionFilter);
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
index c00ba84410..6e050d0649 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
@@ -77,7 +77,9 @@ public Table apply(TableInfo tableInfo) {
private final BigInteger numRows;
private final TableDefinition definition;
private final EncryptionConfiguration encryptionConfiguration;
- private final Labels labels;
+ private final Annotations labels;
+
+ private final Annotations resourceTags;
private final Boolean requirePartitionFilter;
private final String defaultCollation;
@@ -152,6 +154,9 @@ public abstract static class Builder {
@BetaApi
public abstract Builder setLabels(Map labels);
+ /** Sets the resource tags applied to this table. */
+ public abstract Builder setResourceTags(Map resourceTags);
+
/** Creates a {@code TableInfo} object. */
public abstract TableInfo build();
@@ -191,7 +196,9 @@ static class BuilderImpl extends Builder {
private BigInteger numRows;
private TableDefinition definition;
private EncryptionConfiguration encryptionConfiguration;
- private Labels labels = Labels.ZERO;
+ private Annotations labels = Annotations.ZERO;
+
+ private Annotations resourceTags = Annotations.ZERO;
private Boolean requirePartitionFilter;
private String defaultCollation;
private CloneDefinition cloneDefinition;
@@ -222,6 +229,7 @@ static class BuilderImpl extends Builder {
this.definition = tableInfo.definition;
this.encryptionConfiguration = tableInfo.encryptionConfiguration;
this.labels = tableInfo.labels;
+ this.resourceTags = tableInfo.resourceTags;
this.requirePartitionFilter = tableInfo.requirePartitionFilter;
this.defaultCollation = tableInfo.defaultCollation;
this.cloneDefinition = tableInfo.cloneDefinition;
@@ -255,7 +263,8 @@ static class BuilderImpl extends Builder {
this.encryptionConfiguration =
new EncryptionConfiguration.Builder(tablePb.getEncryptionConfiguration()).build();
}
- this.labels = Labels.fromPb(tablePb.getLabels());
+ this.labels = Annotations.fromPb(tablePb.getLabels());
+ this.resourceTags = Annotations.fromPb(tablePb.getResourceTags());
this.requirePartitionFilter = tablePb.getRequirePartitionFilter();
this.defaultCollation = tablePb.getDefaultCollation();
if (tablePb.getCloneDefinition() != null) {
@@ -394,7 +403,13 @@ public Builder setEncryptionConfiguration(EncryptionConfiguration configuration)
@Override
public Builder setLabels(Map labels) {
- this.labels = Labels.fromUser(labels);
+ this.labels = Annotations.fromUser(labels);
+ return this;
+ }
+
+ @Override
+ public Builder setResourceTags(Map resourceTags) {
+ this.resourceTags = Annotations.fromUser(resourceTags);
return this;
}
@@ -449,6 +464,7 @@ public TableInfo build() {
this.definition = builder.definition;
this.encryptionConfiguration = builder.encryptionConfiguration;
this.labels = builder.labels;
+ this.resourceTags = builder.resourceTags;
this.requirePartitionFilter = builder.requirePartitionFilter;
this.defaultCollation = builder.defaultCollation;
this.cloneDefinition = builder.cloneDefinition;
@@ -610,6 +626,11 @@ public Map getLabels() {
return labels.userMap();
}
+ /** Return a map for resource tags applied to the table. */
+ public Map getResourceTags() {
+ return resourceTags.userMap();
+ }
+
/**
* Returns true if a partition filter (that can be used for partition elimination) is required for
* queries over this table.
@@ -660,6 +681,7 @@ public String toString() {
.add("definition", definition)
.add("encryptionConfiguration", encryptionConfiguration)
.add("labels", labels)
+ .add("resourceTags", resourceTags)
.add("requirePartitionFilter", requirePartitionFilter)
.add("defaultCollation", defaultCollation)
.add("cloneDefinition", cloneDefinition)
@@ -724,6 +746,7 @@ Table toPb() {
tablePb.setEncryptionConfiguration(encryptionConfiguration.toPb());
}
tablePb.setLabels(labels.toPb());
+ tablePb.setResourceTags(resourceTags.toPb());
tablePb.setRequirePartitionFilter(requirePartitionFilter);
if (defaultCollation != null) {
tablePb.setDefaultCollation(defaultCollation);
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
index 96a10deb33..841a790ee6 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
@@ -105,7 +105,7 @@ public HttpBigQueryRpc(BigQueryOptions options) {
this.options = options;
bigquery =
new Bigquery.Builder(transport, new GsonFactory(), initializer)
- .setRootUrl(options.getHost())
+ .setRootUrl(options.getResolvedApiaryHost("bigquery"))
.setApplicationName(options.getApplicationName())
.build();
}
@@ -114,9 +114,16 @@ private static BigQueryException translate(IOException exception) {
return new BigQueryException(exception);
}
+ private void validateRPC() throws BigQueryException, IOException {
+ if (!this.options.hasValidUniverseDomain()) {
+ throw new BigQueryException(BigQueryException.UNKNOWN_CODE, "Invalid universe domain");
+ }
+ }
+
@Override
public Dataset getDataset(String projectId, String datasetId, Map
@@ -73,7 +73,7 @@
com.google.cloud
google-cloud-bigquerystorage-bom
- 2.47.0
+ 3.0.1
pom
import
@@ -97,7 +97,7 @@
com.google.cloud
google-cloud-datacatalog-bom
- 1.36.0
+ 1.40.0
pom
import
@@ -111,7 +111,7 @@
com.google.cloud
google-cloud-bigquery
- 2.36.0
+ 2.37.0
@@ -137,7 +137,7 @@
com.google.truth
truth
- 1.2.0
+ 1.3.0
test
@@ -155,19 +155,19 @@
com.google.cloud
google-cloud-storage
- 2.31.0
+ 2.32.1
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.34.0
+ 2.36.0
test
com.google.api.grpc
proto-google-cloud-bigqueryconnection-v1
- 2.34.0
+ 2.36.0
test
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 99e3a85400..de976d88ab 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -45,31 +45,31 @@
com.google.cloud
google-cloud-bigquery
- 2.35.0
+ 2.36.0
com.google.oauth-client
google-oauth-client-java6
- 1.34.1
+ 1.35.0
com.google.oauth-client
google-oauth-client-jetty
- 1.34.1
+ 1.35.0
com.google.cloud
google-cloud-bigtable
- 2.30.0
+ 2.31.0
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.34.0
+ 2.36.0
test
@@ -81,7 +81,7 @@
com.google.truth
truth
- 1.2.0
+ 1.3.0
test
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index 95de88cf6e..df62de7dc2 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -62,7 +62,7 @@
com.google.truth
truth
- 1.2.0
+ 1.3.0
test
@@ -111,7 +111,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.2.3
+ 3.2.5
**/*IT
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index a38c313c7f..f96a2ed83f 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -44,30 +44,30 @@
com.google.cloud
google-cloud-bigquery
- 2.36.0
+ 2.37.0
com.google.oauth-client
google-oauth-client-java6
- 1.34.1
+ 1.35.0
com.google.oauth-client
google-oauth-client-jetty
- 1.34.1
+ 1.35.0
com.google.cloud
google-cloud-bigtable
- 2.30.0
+ 2.31.0
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.34.0
+ 2.36.0
test
@@ -79,7 +79,7 @@
com.google.truth
truth
- 1.2.0
+ 1.3.0
test
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 3debd229ed..732a9b53dd 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -66,12 +66,12 @@
com.google.oauth-client
google-oauth-client-java6
- 1.34.1
+ 1.35.0
com.google.oauth-client
google-oauth-client-jetty
- 1.34.1
+ 1.35.0
@@ -79,13 +79,13 @@
com.google.cloud
google-cloud-bigtable
- 2.30.0
+ 2.31.0
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.34.0
+ 2.36.0
test
@@ -97,7 +97,7 @@
com.google.truth
truth
- 1.2.0
+ 1.3.0
test
diff --git a/samples/snippets/src/main/java/com/example/bigquery/SimpleQuery.java b/samples/snippets/src/main/java/com/example/bigquery/SimpleQuery.java
index 1aeaff1955..429a339cf5 100644
--- a/samples/snippets/src/main/java/com/example/bigquery/SimpleQuery.java
+++ b/samples/snippets/src/main/java/com/example/bigquery/SimpleQuery.java
@@ -17,6 +17,7 @@
package com.example.bigquery;
// [START bigquery_query]
+
import com.google.cloud.bigquery.BigQuery;
import com.google.cloud.bigquery.BigQueryException;
import com.google.cloud.bigquery.BigQueryOptions;
@@ -27,7 +28,9 @@ public class SimpleQuery {
public static void main(String[] args) {
// TODO(developer): Replace this query before running the sample.
- String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
+ String query =
+ "SELECT corpus, count(*) as corpus_count "
+ + "FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
simpleQuery(query);
}
@@ -44,7 +47,14 @@ public static void simpleQuery(String query) {
TableResult result = bigquery.query(queryConfig);
// Print the results.
- result.iterateAll().forEach(rows -> rows.forEach(row -> System.out.println(row.getValue())));
+ result
+ .iterateAll()
+ .forEach(
+ row -> {
+ System.out.print("corpus:" + row.get("corpus").getStringValue());
+ System.out.print(", count:" + row.get("corpus_count").getLongValue());
+ System.out.println();
+ });
System.out.println("Query ran successfully");
} catch (BigQueryException | InterruptedException e) {
diff --git a/samples/snippets/src/test/java/com/example/bigquery/SimpleQueryIT.java b/samples/snippets/src/test/java/com/example/bigquery/SimpleQueryIT.java
index b750c31464..5441ffccad 100644
--- a/samples/snippets/src/test/java/com/example/bigquery/SimpleQueryIT.java
+++ b/samples/snippets/src/test/java/com/example/bigquery/SimpleQueryIT.java
@@ -51,7 +51,9 @@ public void tearDown() {
@Test
public void testSimpleQuery() {
- String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
+ String query =
+ "SELECT corpus, count(*) as corpus_count "
+ + "FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
SimpleQuery.simpleQuery(query);
assertThat(bout.toString()).contains("Query ran successfully");
diff --git a/versions.txt b/versions.txt
index e2ab490a51..fc69e91467 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
# Format:
# module:released-version:current-version
-google-cloud-bigquery:2.36.0:2.36.0
\ No newline at end of file
+google-cloud-bigquery:2.37.0:2.37.0
\ No newline at end of file