Skip to content

Commit

Permalink
Fixes a regression related to BQ read transform upgrad via the Transf…
Browse files Browse the repository at this point in the history
…ormService (#31685)
  • Loading branch information
chamikaramj committed Jun 26, 2024
1 parent c1c853f commit 90d3f8a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,16 @@ public TypedRead<?> fromConfigRow(Row configRow, PipelineOptions options) {
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));
Expand Down

0 comments on commit 90d3f8a

Please sign in to comment.