diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 0926a04526..ee94a030bc 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [11, 17, 21]
+ java: [11, 17, 21, 25]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-java@v2
diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml
index a0b250b870..a6e58c4b48 100644
--- a/.github/workflows/unmanaged_dependency_check.yaml
+++ b/.github/workflows/unmanaged_dependency_check.yaml
@@ -17,6 +17,6 @@ jobs:
# repository
.kokoro/build.sh
- name: Unmanaged dependency check
- uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.52.3
+ uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.53.0
with:
bom-path: google-cloud-bigquerystorage-bom/pom.xml
diff --git a/.kokoro/continuous/graalvm-native-a.cfg b/.kokoro/continuous/graalvm-native-a.cfg
index b7567eeb7d..55c5543e26 100644
--- a/.kokoro/continuous/graalvm-native-a.cfg
+++ b/.kokoro/continuous/graalvm-native-a.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/.kokoro/continuous/graalvm-native-b.cfg b/.kokoro/continuous/graalvm-native-b.cfg
index c7205f0abd..5c981b9848 100644
--- a/.kokoro/continuous/graalvm-native-b.cfg
+++ b/.kokoro/continuous/graalvm-native-b.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/.kokoro/continuous/graalvm-native-c.cfg b/.kokoro/continuous/graalvm-native-c.cfg
index f6ab8976a5..f2032499df 100644
--- a/.kokoro/continuous/graalvm-native-c.cfg
+++ b/.kokoro/continuous/graalvm-native-c.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg
index c6dbbdc522..dff3d3e36b 100644
--- a/.kokoro/presubmit/graalvm-native-a.cfg
+++ b/.kokoro/presubmit/graalvm-native-a.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.0"
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.53.0"
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg
index 6c66c8d835..95870eaa35 100644
--- a/.kokoro/presubmit/graalvm-native-b.cfg
+++ b/.kokoro/presubmit/graalvm-native-b.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.0"
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.53.0"
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg
index 2a4f45eaef..ca49f7431a 100644
--- a/.kokoro/presubmit/graalvm-native-c.cfg
+++ b/.kokoro/presubmit/graalvm-native-c.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.0"
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.53.0"
}
env_vars: {
diff --git a/CHANGELOG.md b/CHANGELOG.md
index caec87a87c..bf48fa32a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## [3.17.3](https://github.com/googleapis/java-bigquerystorage/compare/v3.17.2...v3.17.3) (2025-10-20)
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.53.0 ([#3112](https://github.com/googleapis/java-bigquerystorage/issues/3112)) ([345b153](https://github.com/googleapis/java-bigquerystorage/commit/345b153070eb2c91298fe5affa5d1d6b4be6f235))
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.53.0 ([#3114](https://github.com/googleapis/java-bigquerystorage/issues/3114)) ([1ddfc63](https://github.com/googleapis/java-bigquerystorage/commit/1ddfc63cea149e2a5ff5087a6c780e252e0afa59))
+
## [3.17.2](https://github.com/googleapis/java-bigquerystorage/compare/v3.17.1...v3.17.2) (2025-10-07)
diff --git a/README.md b/README.md
index 400157fd02..108867e826 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloud
libraries-bom
- 26.65.0
+ 26.70.0
pom
import
@@ -29,7 +29,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1.52.0
pom
import
-
+
@@ -48,7 +48,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-bigquerystorage
- 3.16.1
+ 3.17.2
```
@@ -63,13 +63,13 @@ implementation 'com.google.cloud:google-cloud-bigquerystorage'
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-bigquerystorage:3.17.2'
+implementation 'com.google.cloud:google-cloud-bigquerystorage:3.17.3'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "3.17.2"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "3.17.3"
```
## Authentication
@@ -153,6 +153,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-bigquerystora
| Write Nested Proto | [source code](https://github.com/googleapis/java-bigquerystorage/blob/main/samples/snippets/src/main/java/com/example/bigquerystorage/WriteNestedProto.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerystorage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerystorage/WriteNestedProto.java) |
| Write Pending Stream | [source code](https://github.com/googleapis/java-bigquerystorage/blob/main/samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerystorage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java) |
| Write To Default Stream | [source code](https://github.com/googleapis/java-bigquerystorage/blob/main/samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStream.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerystorage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStream.java) |
+| Write To Default Stream With Arrow | [source code](https://github.com/googleapis/java-bigquerystorage/blob/main/samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStreamWithArrow.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerystorage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStreamWithArrow.java) |
@@ -256,7 +257,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-bigquerystorage/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-bigquerystorage.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerystorage/3.17.2
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerystorage/3.17.3
[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/google-cloud-bigquerystorage-bom/pom.xml b/google-cloud-bigquerystorage-bom/pom.xml
index 50cec4d408..f8630f467a 100644
--- a/google-cloud-bigquerystorage-bom/pom.xml
+++ b/google-cloud-bigquerystorage-bom/pom.xml
@@ -3,12 +3,12 @@
4.0.0
com.google.cloud
google-cloud-bigquerystorage-bom
- 3.17.2
+ 3.17.3
pom
com.google.cloud
sdk-platform-java-config
- 3.52.3
+ 3.53.0
Google Cloud bigquerystorage BOM
@@ -52,57 +52,57 @@
com.google.cloud
google-cloud-bigquerystorage
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
@@ -116,6 +116,13 @@
true
+
+ org.codehaus.mojo
+ exec-maven-plugin
+
+ true
+
+
diff --git a/google-cloud-bigquerystorage/pom.xml b/google-cloud-bigquerystorage/pom.xml
index 9fee240303..cfc233700f 100644
--- a/google-cloud-bigquerystorage/pom.xml
+++ b/google-cloud-bigquerystorage/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-bigquerystorage
- 3.17.2
+ 3.17.3
jar
BigQuery Storage
https://github.com/googleapis/java-bigquerystorage
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
google-cloud-bigquerystorage
diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/it/ITBigQueryStorageTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/it/ITBigQueryStorageTest.java
index 7cf1513ab0..a8f7b0b8bc 100644
--- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/it/ITBigQueryStorageTest.java
+++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/it/ITBigQueryStorageTest.java
@@ -33,7 +33,7 @@
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ServerStream;
import com.google.api.gax.rpc.UnauthenticatedException;
-import com.google.auth.oauth2.GoogleCredentials;
+import com.google.auth.oauth2.ServiceAccountCredentials;
import com.google.cloud.RetryOption;
import com.google.cloud.ServiceOptions;
import com.google.cloud.bigquery.BigQuery;
@@ -1852,10 +1852,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
return completedJob;
}
- static GoogleCredentials loadCredentials(String credentialFile) {
+ static ServiceAccountCredentials loadCredentials(String credentialFile) {
try {
InputStream keyStream = new ByteArrayInputStream(credentialFile.getBytes());
- return GoogleCredentials.fromStream(keyStream);
+ return ServiceAccountCredentials.fromStream(keyStream);
} catch (IOException e) {
fail("Couldn't create fake JSON credentials.");
}
diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java
index d91bb267fb..bc772f0119 100644
--- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java
+++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java
@@ -27,7 +27,7 @@
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.api.gax.rpc.ServerStream;
import com.google.api.gax.rpc.UnauthenticatedException;
-import com.google.auth.oauth2.GoogleCredentials;
+import com.google.auth.oauth2.ServiceAccountCredentials;
import com.google.cloud.RetryOption;
import com.google.cloud.ServiceOptions;
import com.google.cloud.bigquery.BigQuery;
@@ -1315,10 +1315,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
return completedJob;
}
- static GoogleCredentials loadCredentials(String credentialFile) {
+ static ServiceAccountCredentials loadCredentials(String credentialFile) {
try {
InputStream keyStream = new ByteArrayInputStream(credentialFile.getBytes());
- return GoogleCredentials.fromStream(keyStream);
+ return ServiceAccountCredentials.fromStream(keyStream);
} catch (IOException e) {
fail("Couldn't create fake JSON credentials.");
}
diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryStorageTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryStorageTest.java
index 6420da74d3..ebece5944c 100644
--- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryStorageTest.java
+++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryStorageTest.java
@@ -27,7 +27,7 @@
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.api.gax.rpc.ServerStream;
import com.google.api.gax.rpc.UnauthenticatedException;
-import com.google.auth.oauth2.GoogleCredentials;
+import com.google.auth.oauth2.ServiceAccountCredentials;
import com.google.cloud.RetryOption;
import com.google.cloud.ServiceOptions;
import com.google.cloud.bigquery.BigQuery;
@@ -1295,10 +1295,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
return completedJob;
}
- static GoogleCredentials loadCredentials(String credentialFile) {
+ static ServiceAccountCredentials loadCredentials(String credentialFile) {
try {
InputStream keyStream = new ByteArrayInputStream(credentialFile.getBytes());
- return GoogleCredentials.fromStream(keyStream);
+ return ServiceAccountCredentials.fromStream(keyStream);
} catch (IOException e) {
fail("Couldn't create fake JSON credentials.");
}
diff --git a/grpc-google-cloud-bigquerystorage-v1/pom.xml b/grpc-google-cloud-bigquerystorage-v1/pom.xml
index 1b62b945eb..f3f1b84628 100644
--- a/grpc-google-cloud-bigquerystorage-v1/pom.xml
+++ b/grpc-google-cloud-bigquerystorage-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
grpc-google-cloud-bigquerystorage-v1
GRPC library for grpc-google-cloud-bigquerystorage-v1
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/grpc-google-cloud-bigquerystorage-v1alpha/pom.xml b/grpc-google-cloud-bigquerystorage-v1alpha/pom.xml
index 6d29a324bf..5a4f9e5e20 100644
--- a/grpc-google-cloud-bigquerystorage-v1alpha/pom.xml
+++ b/grpc-google-cloud-bigquerystorage-v1alpha/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
grpc-google-cloud-bigquerystorage-v1alpha
GRPC library for google-cloud-bigquerystorage
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/grpc-google-cloud-bigquerystorage-v1beta/pom.xml b/grpc-google-cloud-bigquerystorage-v1beta/pom.xml
index c9dbbc8509..1e1b647168 100644
--- a/grpc-google-cloud-bigquerystorage-v1beta/pom.xml
+++ b/grpc-google-cloud-bigquerystorage-v1beta/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
grpc-google-cloud-bigquerystorage-v1beta
GRPC library for google-cloud-bigquerystorage
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml b/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml
index 86ec8e1dac..57dd54a4c6 100644
--- a/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml
+++ b/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
grpc-google-cloud-bigquerystorage-v1beta1
GRPC library for grpc-google-cloud-bigquerystorage-v1beta1
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/grpc-google-cloud-bigquerystorage-v1beta2/pom.xml b/grpc-google-cloud-bigquerystorage-v1beta2/pom.xml
index 250b8bcc43..719f5a9466 100644
--- a/grpc-google-cloud-bigquerystorage-v1beta2/pom.xml
+++ b/grpc-google-cloud-bigquerystorage-v1beta2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
grpc-google-cloud-bigquerystorage-v1beta2
GRPC library for grpc-google-cloud-bigquerystorage-v1beta2
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/pom.xml b/pom.xml
index e4e122b0ba..98afc00d87 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-bigquerystorage-parent
pom
- 3.17.2
+ 3.17.3
BigQuery Storage Parent
https://github.com/googleapis/java-bigquerystorage
@@ -14,7 +14,7 @@
com.google.cloud
sdk-platform-java-config
- 3.52.3
+ 3.53.0
@@ -83,57 +83,57 @@
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
com.google.api.grpc
grpc-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
com.google.cloud
google-cloud-bigquerystorage
- 3.17.2
+ 3.17.3
org.json
@@ -190,6 +190,15 @@
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+
+ true
+
+
+
diff --git a/proto-google-cloud-bigquerystorage-v1/pom.xml b/proto-google-cloud-bigquerystorage-v1/pom.xml
index d8781e54ab..ffef163b19 100644
--- a/proto-google-cloud-bigquerystorage-v1/pom.xml
+++ b/proto-google-cloud-bigquerystorage-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1
- 3.17.2
+ 3.17.3
proto-google-cloud-bigquerystorage-v1
PROTO library for proto-google-cloud-bigquerystorage-v1
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/proto-google-cloud-bigquerystorage-v1alpha/pom.xml b/proto-google-cloud-bigquerystorage-v1alpha/pom.xml
index e94f6eb5bf..943afc8dea 100644
--- a/proto-google-cloud-bigquerystorage-v1alpha/pom.xml
+++ b/proto-google-cloud-bigquerystorage-v1alpha/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1alpha
- 3.17.2
+ 3.17.3
proto-google-cloud-bigquerystorage-v1alpha
Proto library for google-cloud-bigquerystorage
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/proto-google-cloud-bigquerystorage-v1beta/pom.xml b/proto-google-cloud-bigquerystorage-v1beta/pom.xml
index 43cdc33b14..10ee34e371 100644
--- a/proto-google-cloud-bigquerystorage-v1beta/pom.xml
+++ b/proto-google-cloud-bigquerystorage-v1beta/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta
- 3.17.2
+ 3.17.3
proto-google-cloud-bigquerystorage-v1beta
Proto library for google-cloud-bigquerystorage
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/proto-google-cloud-bigquerystorage-v1beta1/pom.xml b/proto-google-cloud-bigquerystorage-v1beta1/pom.xml
index f0763c7592..09605f0a99 100644
--- a/proto-google-cloud-bigquerystorage-v1beta1/pom.xml
+++ b/proto-google-cloud-bigquerystorage-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta1
- 0.189.2
+ 0.189.3
proto-google-cloud-bigquerystorage-v1beta1
PROTO library for proto-google-cloud-bigquerystorage-v1beta1
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/proto-google-cloud-bigquerystorage-v1beta2/pom.xml b/proto-google-cloud-bigquerystorage-v1beta2/pom.xml
index 3c07e649b5..9371d9f3e0 100644
--- a/proto-google-cloud-bigquerystorage-v1beta2/pom.xml
+++ b/proto-google-cloud-bigquerystorage-v1beta2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigquerystorage-v1beta2
- 0.189.2
+ 0.189.3
proto-google-cloud-bigquerystorage-v1beta2
PROTO library for proto-google-cloud-bigquerystorage-v1beta2
com.google.cloud
google-cloud-bigquerystorage-parent
- 3.17.2
+ 3.17.3
diff --git a/renovate.json b/renovate.json
index 1a34adbfe5..598f2acf29 100644
--- a/renovate.json
+++ b/renovate.json
@@ -16,7 +16,8 @@
{
"customType": "regex",
"managerFilePatterns": [
- "/^.kokoro/continuous/graalvm-native.*.cfg$/"
+ "/^.kokoro/continuous/graalvm-native.*.cfg$/",
+ "/^.kokoro/presubmit/graalvm-native.*.cfg$/"
],
"matchStrings": [
"value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\""
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 56bfe84d94..8078f374fb 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -15,6 +15,7 @@
com.google.cloud.samples
shared-configuration
1.2.2
+
@@ -31,7 +32,7 @@
com.google.cloud
google-cloud-bigquerystorage
- 3.16.1
+ 3.17.2
@@ -55,6 +56,11 @@
arrow-memory-netty
${arrow.version}
+
+ org.apache.arrow
+ arrow-memory-core
+ ${arrow.version}
+
io.opentelemetry
opentelemetry-exporter-logging
diff --git a/samples/pom.xml b/samples/pom.xml
index e372746947..3fa08e0b87 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -51,6 +51,13 @@
true
+
+ org.codehaus.mojo
+ exec-maven-plugin
+
+ true
+
+
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 3c78e27002..7f32fb22b2 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -30,7 +30,7 @@
com.google.cloud
google-cloud-bigquerystorage
- 3.17.2
+ 3.17.3
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 3c02b1d3b0..de49df355e 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -15,6 +15,7 @@
com.google.cloud.samples
shared-configuration
1.2.2
+
@@ -32,7 +33,7 @@
com.google.cloud
libraries-bom
- 26.65.0
+ 26.70.0
pom
import
@@ -42,7 +43,7 @@
1.52.0
pom
import
-
+
@@ -73,6 +74,11 @@
arrow-memory-netty
${arrow.version}
+
+ org.apache.arrow
+ arrow-memory-core
+ ${arrow.version}
+
io.opentelemetry
opentelemetry-exporter-logging
diff --git a/samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStreamWithArrow.java b/samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStreamWithArrow.java
new file mode 100644
index 0000000000..d0bc455a9a
--- /dev/null
+++ b/samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStreamWithArrow.java
@@ -0,0 +1,379 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.bigquerystorage;
+
+// [START bigquerystorage_streamwriter_default_arrow]
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutureCallback;
+import com.google.api.core.ApiFutures;
+import com.google.api.gax.core.FixedExecutorProvider;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.cloud.bigquery.BigQuery;
+import com.google.cloud.bigquery.BigQueryOptions;
+import com.google.cloud.bigquery.QueryJobConfiguration;
+import com.google.cloud.bigquery.TableResult;
+import com.google.cloud.bigquery.storage.v1.AppendRowsRequest;
+import com.google.cloud.bigquery.storage.v1.AppendRowsResponse;
+import com.google.cloud.bigquery.storage.v1.BigQueryWriteClient;
+import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings;
+import com.google.cloud.bigquery.storage.v1.Exceptions;
+import com.google.cloud.bigquery.storage.v1.Exceptions.AppendSerializationError;
+import com.google.cloud.bigquery.storage.v1.Exceptions.MaximumRequestCallbackWaitTimeExceededException;
+import com.google.cloud.bigquery.storage.v1.Exceptions.StorageException;
+import com.google.cloud.bigquery.storage.v1.Exceptions.StreamWriterClosedException;
+import com.google.cloud.bigquery.storage.v1.StreamWriter;
+import com.google.cloud.bigquery.storage.v1.TableName;
+import com.google.common.collect.ImmutableList;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.protobuf.Descriptors.DescriptorValidationException;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Phaser;
+import java.util.concurrent.atomic.AtomicInteger;
+import javax.annotation.concurrent.GuardedBy;
+import org.apache.arrow.memory.BufferAllocator;
+import org.apache.arrow.memory.RootAllocator;
+import org.apache.arrow.vector.BigIntVector;
+import org.apache.arrow.vector.VarCharVector;
+import org.apache.arrow.vector.VectorSchemaRoot;
+import org.apache.arrow.vector.VectorUnloader;
+import org.apache.arrow.vector.compression.CompressionCodec;
+import org.apache.arrow.vector.compression.CompressionUtil;
+import org.apache.arrow.vector.compression.NoCompressionCodec;
+import org.apache.arrow.vector.ipc.message.ArrowRecordBatch;
+import org.apache.arrow.vector.types.pojo.ArrowType;
+import org.apache.arrow.vector.types.pojo.Field;
+import org.apache.arrow.vector.types.pojo.FieldType;
+import org.apache.arrow.vector.types.pojo.Schema;
+import org.threeten.bp.Duration;
+
+/**
+ * This class demonstrates how to ingest data using Arrow format into BigQuery via the default
+ * stream. It initiates a DataWriter to establish a connection to BigQuery and reuses this
+ * connection to continuously ingest data.
+ */
+public class WriteToDefaultStreamWithArrow {
+ public static void main(String[] args)
+ throws DescriptorValidationException, InterruptedException, IOException {
+ if (args.length < 3) {
+ System.out.println(
+ "Usage: WriteToDefaultStreamWithArrow ");
+ return;
+ }
+ String projectId = args[0];
+ String datasetName = args[1];
+ String tableName = args[2];
+ // Table schema should contain 3 fields:
+ // ['test_string': STRING, 'test_int': INTEGER, 'test_geo':GEOGRAPHY]
+ writeToDefaultStreamWithArrow(projectId, datasetName, tableName);
+ }
+
+ private static Schema createArrowSchema() {
+ List fields =
+ ImmutableList.of(
+ new Field("test_string", FieldType.nullable(new ArrowType.Utf8()), null),
+ new Field("test_int", FieldType.nullable(new ArrowType.Int(64, true)), null),
+ new Field("test_geo", FieldType.nullable(new ArrowType.Utf8()), null));
+ return new Schema(fields, null);
+ }
+
+ // Create an ArrowRecordBatch object that is compatible with the table schema.
+ private static ArrowRecordBatch buildRecordBatch(VectorSchemaRoot root, int rowCount) {
+ VarCharVector testString = (VarCharVector) root.getVector("test_string");
+ BigIntVector testInt = (BigIntVector) root.getVector("test_int");
+ VarCharVector testGeo = (VarCharVector) root.getVector("test_geo");
+
+ testString.allocateNew(rowCount);
+ testInt.allocateNew(rowCount);
+ testGeo.allocateNew(rowCount);
+
+ for (int i = 0; i < rowCount; i++) {
+ testString.set(i, ("A" + i).getBytes());
+ testInt.set(i, i + 100);
+ testGeo.set(
+ i,
+ "POLYGON((-124.49 47.35,-124.49 40.73,-116.49 40.73,-113.49 47.35,-124.49 47.35))"
+ .getBytes());
+ }
+ root.setRowCount(rowCount);
+
+ CompressionCodec codec =
+ NoCompressionCodec.Factory.INSTANCE.createCodec(CompressionUtil.CodecType.NO_COMPRESSION);
+ VectorUnloader vectorUnloader =
+ new VectorUnloader(root, /* includeNullCount= */ true, codec, /* alignBuffers= */ true);
+ return vectorUnloader.getRecordBatch();
+ }
+
+ public static void writeToDefaultStreamWithArrow(
+ String projectId, String datasetName, String tableName)
+ throws DescriptorValidationException, InterruptedException, IOException {
+ TableName parentTable = TableName.of(projectId, datasetName, tableName);
+ Schema arrowSchema = createArrowSchema();
+ DataWriter writer = new DataWriter();
+ // One time initialization for the worker.
+ writer.initialize(parentTable, arrowSchema);
+ long initialRowCount = getRowCount(parentTable);
+ BufferAllocator allocator = new RootAllocator();
+
+ // A writer should be used to ingest as much data as possible before teardown.
+ // Append 100 batches.
+ for (int i = 0; i < 100; i++) {
+ try (VectorSchemaRoot root = VectorSchemaRoot.create(arrowSchema, allocator)) {
+ // Each batch has 10 rows.
+ ArrowRecordBatch batch = buildRecordBatch(root, 10);
+
+ // Asynchronous append.
+ writer.append(new ArrowData(arrowSchema, batch));
+ }
+ }
+ // Final cleanup for the stream during worker teardown.
+ // It's blocked until all append requests' response are received.
+ writer.cleanup();
+
+ verifyExpectedRowCount(parentTable, initialRowCount + 1000);
+ System.out.println("Appended records successfully.");
+ }
+
+ private static long getRowCount(TableName parentTable) throws InterruptedException {
+ String queryRowCount =
+ "SELECT COUNT(*) FROM `"
+ + parentTable.getProject()
+ + "."
+ + parentTable.getDataset()
+ + "."
+ + parentTable.getTable()
+ + "`";
+ QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(queryRowCount).build();
+ BigQuery bigquery =
+ BigQueryOptions.newBuilder().setProjectId(parentTable.getProject()).build().getService();
+ TableResult results = bigquery.query(queryConfig);
+ return Long.parseLong(results.getValues().iterator().next().get("f0_").getStringValue());
+ }
+
+ private static void verifyExpectedRowCount(TableName parentTable, long expectedRowCount)
+ throws InterruptedException {
+ String queryRowCount =
+ "SELECT COUNT(*) FROM `"
+ + parentTable.getProject()
+ + "."
+ + parentTable.getDataset()
+ + "."
+ + parentTable.getTable()
+ + "`";
+ QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(queryRowCount).build();
+ BigQuery bigquery =
+ BigQueryOptions.newBuilder().setProjectId(parentTable.getProject()).build().getService();
+ TableResult results = bigquery.query(queryConfig);
+ int countRowsActual =
+ Integer.parseInt(results.getValues().iterator().next().get("f0_").getStringValue());
+ if (countRowsActual != expectedRowCount) {
+ throw new RuntimeException(
+ "Unexpected row count. Expected: " + expectedRowCount + ". Actual: " + countRowsActual);
+ }
+ }
+
+ private static class ArrowData {
+ Schema arrowSchema;
+ ArrowRecordBatch data;
+
+ ArrowData(Schema arrowSchema, ArrowRecordBatch data) {
+ this.arrowSchema = arrowSchema;
+ this.data = data;
+ }
+ }
+
+ private static class DataWriter {
+
+ private static final int MAX_RECREATE_COUNT = 3;
+
+ private BigQueryWriteClient client;
+
+ // Track the number of in-flight requests to wait for all responses before shutting down.
+ private final Phaser inflightRequestCount = new Phaser(1);
+ private final Object lock = new Object();
+
+ private Schema arrowSchema;
+ private StreamWriter streamWriter;
+
+ @GuardedBy("lock")
+ private RuntimeException error = null;
+
+ private final AtomicInteger recreateCount = new AtomicInteger(0);
+
+ private StreamWriter createStreamWriter(String streamName, Schema arrowSchema)
+ throws DescriptorValidationException, IOException, InterruptedException {
+ // Configure in-stream automatic retry settings.
+ // Error codes that are immediately retried:
+ // * ABORTED, UNAVAILABLE, CANCELLED, INTERNAL, DEADLINE_EXCEEDED
+ // Error codes that are retried with exponential backoff:
+ // * RESOURCE_EXHAUSTED
+ RetrySettings retrySettings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(500))
+ .setRetryDelayMultiplier(1.1)
+ .setMaxAttempts(5)
+ .setMaxRetryDelay(Duration.ofMinutes(1))
+ .build();
+
+ // Use the Stream writer to send records in Arrow format. Specify the table name to write
+ // to the default stream.
+ // For more information about StreamWriter, see:
+ // https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1.StreamWriter
+ return StreamWriter.newBuilder(streamName, client)
+ .setExecutorProvider(FixedExecutorProvider.create(Executors.newScheduledThreadPool(100)))
+ .setChannelProvider(
+ BigQueryWriteSettings.defaultGrpcTransportProviderBuilder()
+ .setKeepAliveTime(org.threeten.bp.Duration.ofMinutes(1))
+ .setKeepAliveTimeout(org.threeten.bp.Duration.ofMinutes(1))
+ .setKeepAliveWithoutCalls(true)
+ .setChannelsPerCpu(2)
+ .build())
+ .setEnableConnectionPool(true)
+ // If value is missing in ArrowRecordBatch and there is a default value configured on
+ // bigquery column, apply the default value to the missing value field.
+ .setDefaultMissingValueInterpretation(
+ AppendRowsRequest.MissingValueInterpretation.DEFAULT_VALUE)
+ .setMaxRetryDuration(java.time.Duration.ofSeconds(5))
+ // Set the StreamWriter with Arrow Schema, this would only allow the StreamWriter to
+ // append data in Arrow format.
+ .setWriterSchema(arrowSchema)
+ .setRetrySettings(retrySettings)
+ .build();
+ }
+
+ public void initialize(TableName parentTable, Schema arrowSchema)
+ throws DescriptorValidationException, IOException, InterruptedException {
+ // Initialize client without settings, internally within stream writer a new client will be
+ // created with full settings.
+ client = BigQueryWriteClient.create();
+
+ streamWriter = createStreamWriter(parentTable.toString() + "/_default", arrowSchema);
+ }
+
+ public void append(ArrowData arrowData)
+ throws DescriptorValidationException, IOException, InterruptedException {
+ synchronized (this.lock) {
+ if (!streamWriter.isUserClosed()
+ && streamWriter.isClosed()
+ && recreateCount.getAndIncrement() < MAX_RECREATE_COUNT) {
+ streamWriter = createStreamWriter(streamWriter.getStreamName(), arrowData.arrowSchema);
+ this.error = null;
+ }
+ // If earlier appends have failed, we need to reset before continuing.
+ if (this.error != null) {
+ throw this.error;
+ }
+ }
+ // Append asynchronously for increased throughput.
+ ApiFuture future = streamWriter.append(arrowData.data);
+ ApiFutures.addCallback(
+ future, new AppendCompleteCallback(this, arrowData), MoreExecutors.directExecutor());
+
+ // Increase the count of in-flight requests.
+ inflightRequestCount.register();
+ }
+
+ public void cleanup() {
+ // Wait for all in-flight requests to complete.
+ inflightRequestCount.arriveAndAwaitAdvance();
+
+ client.close();
+ // Close the connection to the server.
+ streamWriter.close();
+
+ // Verify that no error occurred in the stream.
+ synchronized (this.lock) {
+ if (this.error != null) {
+ throw this.error;
+ }
+ }
+ }
+
+ static class AppendCompleteCallback implements ApiFutureCallback {
+
+ private final DataWriter parent;
+ private final ArrowData arrowData;
+
+ public AppendCompleteCallback(DataWriter parent, ArrowData arrowData) {
+ this.parent = parent;
+ this.arrowData = arrowData;
+ }
+
+ public void onSuccess(AppendRowsResponse response) {
+ System.out.format("Append success\n");
+ this.parent.recreateCount.set(0);
+ done();
+ }
+
+ public void onFailure(Throwable throwable) {
+ System.out.format("Append failed: " + throwable.toString());
+ if (throwable instanceof AppendSerializationError) {
+ AppendSerializationError ase = (AppendSerializationError) throwable;
+ Map rowIndexToErrorMessage = ase.getRowIndexToErrorMessage();
+ if (rowIndexToErrorMessage.size() > 0) {
+ System.out.format("row level errors: " + rowIndexToErrorMessage.toString());
+ // The append returned failure with indices for faulty rows.
+ // Fix the faulty rows or remove them from the appended data and retry the append.
+ done();
+ return;
+ }
+ }
+
+ boolean resendRequest = false;
+ if (throwable instanceof MaximumRequestCallbackWaitTimeExceededException) {
+ resendRequest = true;
+ } else if (throwable instanceof StreamWriterClosedException) {
+ if (!parent.streamWriter.isUserClosed()) {
+ resendRequest = true;
+ }
+ }
+ if (resendRequest) {
+ // Retry this request.
+ try {
+ this.parent.append(new ArrowData(arrowData.arrowSchema, arrowData.data));
+ } catch (DescriptorValidationException e) {
+ throw new RuntimeException(e);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ // Mark the existing attempt as done since we got a response for it
+ done();
+ return;
+ }
+
+ synchronized (this.parent.lock) {
+ if (this.parent.error == null) {
+ StorageException storageException = Exceptions.toStorageException(throwable);
+ this.parent.error =
+ (storageException != null) ? storageException : new RuntimeException(throwable);
+ }
+ }
+ done();
+ }
+
+ private void done() {
+ // Reduce the count of in-flight requests.
+ this.parent.inflightRequestCount.arriveAndDeregister();
+ }
+ }
+ }
+}
+// [END bigquerystorage_streamwriter_default_arrow]
diff --git a/samples/snippets/src/test/java/com/example/bigquerystorage/WriteToDefaultStreamArrowIT.java b/samples/snippets/src/test/java/com/example/bigquerystorage/WriteToDefaultStreamArrowIT.java
new file mode 100644
index 0000000000..cb09faa479
--- /dev/null
+++ b/samples/snippets/src/test/java/com/example/bigquerystorage/WriteToDefaultStreamArrowIT.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.bigquerystorage;
+
+import static com.google.common.truth.Truth.assertThat;
+import static junit.framework.TestCase.assertNotNull;
+
+import com.google.cloud.bigquery.BigQuery;
+import com.google.cloud.bigquery.BigQuery.DatasetDeleteOption;
+import com.google.cloud.bigquery.BigQueryOptions;
+import com.google.cloud.bigquery.DatasetId;
+import com.google.cloud.bigquery.DatasetInfo;
+import com.google.cloud.bigquery.Schema;
+import com.google.cloud.bigquery.StandardSQLTypeName;
+import com.google.cloud.bigquery.StandardTableDefinition;
+import com.google.cloud.bigquery.TableId;
+import com.google.cloud.bigquery.TableInfo;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.util.UUID;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class WriteToDefaultStreamArrowIT {
+
+ private static final String GOOGLE_CLOUD_PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT");
+
+ private ByteArrayOutputStream bout;
+ private PrintStream out;
+ private BigQuery bigquery;
+ private String datasetName;
+ private String tableName;
+
+ private static void requireEnvVar(String varName) {
+ assertNotNull(
+ "Environment variable " + varName + " is required to perform these tests.",
+ System.getenv(varName));
+ }
+
+ @BeforeClass
+ public static void checkRequirements() {
+ requireEnvVar("GOOGLE_CLOUD_PROJECT");
+ }
+
+ @Before
+ public void setUp() {
+ bout = new ByteArrayOutputStream();
+ out = new PrintStream(bout);
+ System.setOut(out);
+
+ bigquery = BigQueryOptions.getDefaultInstance().getService();
+
+ // Create a new dataset and table for each test.
+ datasetName = "WRITE_STREAM_TEST" + UUID.randomUUID().toString().substring(0, 8);
+ tableName = "DEFAULT_STREAM_TEST" + UUID.randomUUID().toString().substring(0, 8);
+ Schema schema =
+ Schema.of(
+ com.google.cloud.bigquery.Field.newBuilder("test_string", StandardSQLTypeName.STRING)
+ .setMaxLength(20L)
+ .build(),
+ com.google.cloud.bigquery.Field.newBuilder("test_int", StandardSQLTypeName.INT64)
+ .build(),
+ com.google.cloud.bigquery.Field.newBuilder("test_geo", StandardSQLTypeName.GEOGRAPHY)
+ .build());
+ bigquery.create(DatasetInfo.newBuilder(datasetName).build());
+ TableInfo tableInfo =
+ TableInfo.newBuilder(TableId.of(datasetName, tableName), StandardTableDefinition.of(schema))
+ .build();
+ bigquery.create(tableInfo);
+ }
+
+ @After
+ public void tearDown() {
+ bigquery.delete(
+ DatasetId.of(GOOGLE_CLOUD_PROJECT, datasetName), DatasetDeleteOption.deleteContents());
+ System.setOut(null);
+ }
+
+ @Test
+ public void testWriteToDefaultStream() throws Exception {
+ WriteToDefaultStreamWithArrow.writeToDefaultStreamWithArrow(
+ GOOGLE_CLOUD_PROJECT, datasetName, tableName);
+ assertThat(bout.toString()).contains("Appended records successfully.");
+ }
+}
diff --git a/versions.txt b/versions.txt
index 7bcc8024b5..e79866124c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,14 +1,14 @@
# Format:
# module:released-version:current-version
-google-cloud-bigquerystorage:3.17.2:3.17.2
-grpc-google-cloud-bigquerystorage-v1beta1:0.189.2:0.189.2
-grpc-google-cloud-bigquerystorage-v1beta2:0.189.2:0.189.2
-grpc-google-cloud-bigquerystorage-v1:3.17.2:3.17.2
-proto-google-cloud-bigquerystorage-v1beta1:0.189.2:0.189.2
-proto-google-cloud-bigquerystorage-v1beta2:0.189.2:0.189.2
-proto-google-cloud-bigquerystorage-v1:3.17.2:3.17.2
-grpc-google-cloud-bigquerystorage-v1alpha:3.17.2:3.17.2
-proto-google-cloud-bigquerystorage-v1alpha:3.17.2:3.17.2
-proto-google-cloud-bigquerystorage-v1beta:3.17.2:3.17.2
-grpc-google-cloud-bigquerystorage-v1beta:3.17.2:3.17.2
+google-cloud-bigquerystorage:3.17.3:3.17.3
+grpc-google-cloud-bigquerystorage-v1beta1:0.189.3:0.189.3
+grpc-google-cloud-bigquerystorage-v1beta2:0.189.3:0.189.3
+grpc-google-cloud-bigquerystorage-v1:3.17.3:3.17.3
+proto-google-cloud-bigquerystorage-v1beta1:0.189.3:0.189.3
+proto-google-cloud-bigquerystorage-v1beta2:0.189.3:0.189.3
+proto-google-cloud-bigquerystorage-v1:3.17.3:3.17.3
+grpc-google-cloud-bigquerystorage-v1alpha:3.17.3:3.17.3
+proto-google-cloud-bigquerystorage-v1alpha:3.17.3:3.17.3
+proto-google-cloud-bigquerystorage-v1beta:3.17.3:3.17.3
+grpc-google-cloud-bigquerystorage-v1beta:3.17.3:3.17.3