You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ch...@apache.org on 2024/06/26 03:37:18 UTC
(beam) branch master updated: Fixes a regression related to BQ read transform upgrad via the TransformService (#31685)
This is an automated email from the ASF dual-hosted git repository.
chamikara pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 90d3f8a177f Fixes a regression related to BQ read transform upgrad via the TransformService (#31685)
90d3f8a177f is described below
commit 90d3f8a177ff935a09852fd85892bb1399b85c91
Author: Chamikara Jayalath <ch...@gmail.com>
AuthorDate: Tue Jun 25 20:37:09 2024 -0700
Fixes a regression related to BQ read transform upgrad via the TransformService (#31685)
---
.../beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java
index fe6d93954ee..5b9b80071ec 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java
@@ -274,10 +274,16 @@ public class BigQueryIOTranslation {
if (queryTempDataset != null) {
builder = builder.setQueryTempDataset(queryTempDataset);
}
- String queryTempProject = configRow.getString("query_temp_project");
- if (queryTempProject != null) {
- builder = builder.setQueryTempProject(queryTempProject);
+
+ if (TransformUpgrader.compareVersions(updateCompatibilityBeamVersion, "2.57.0") >= 0) {
+ // This property was added for Beam 2.57.0 hence not available when
+ // upgrading the transform from previous Beam versions.
+ String queryTempProject = configRow.getString("query_temp_project");
+ if (queryTempProject != null) {
+ builder = builder.setQueryTempProject(queryTempProject);
+ }
}
+
byte[] methodBytes = configRow.getBytes("method");
if (methodBytes != null) {
builder = builder.setMethod((TypedRead.Method) fromByteArray(methodBytes));