From c2dcf6fea0e6c5ed8085269fbec884deb5f32ad0 Mon Sep 17 00:00:00 2001 From: Yiru Tang Date: Thu, 2 Sep 2021 18:22:09 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20Cannot=20share=20client=20between=20appe?= =?UTF-8?q?ndRows=20and=20other=20function=20becaus=E2=80=A6=20(#1290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …e appendRows needs to recreate the client to manually inject headers need for regionalization --- .../java/com/example/bigquerystorage/WritePendingStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java b/samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java index 1c7803986b..fc7b4c1af5 100644 --- a/samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java +++ b/samples/snippets/src/main/java/com/example/bigquerystorage/WritePendingStream.java @@ -65,7 +65,7 @@ public static void writePendingStream(String projectId, String datasetName, Stri // For more information about JsonStreamWriter, see: // https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.html try (JsonStreamWriter writer = - JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema(), client) + JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema()) .build()) { // Append 10 JSON objects to the stream. for (int i = 0; i < 10; i++) {