You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has same root cause of #22372 and confirmed that the issue did not occur in Beam 2.39.0. While most of the use cases are fixed, this bug remains as of 2.45.0.
the processElement here does not consider the case of dynamic destination. It simply gets the first destination in the incoming list of element to setup zeroJob, and the outputs have have same destination.
The implementation of Java UpdateSchemaDestination and Python UpdateDestinationSchema is not the same. Python does not have this issue. In Python implementation both zero load job and copy job takes same PCollection as main input.
We should either change the java implementation to be same as Python, or make the input of UpdateSchemaDestination KV<DestinationT, Iterable<WriteTables.Result>> so each processElement deals with one destination.
Regarding above comment about the following line, just tested it and equality check works fine even though they have a different String representation:
Regarding above comment about the following line, just tested it and equality check works fine even though they have a different String representation:
so pass either wrapped or unwrapped dynamic destination to UpdateSchemaDestination is fine.
We still would still want to wrap with match table dynamicdestinations because that's what we're doing when creating temp tables. For a given temp table, we want to pull the same schema consistently for both operations.
Activity
Abacn commentedon Feb 7, 2023
Has same root cause of #22372 and confirmed that the issue did not occur in Beam 2.39.0. While most of the use cases are fixed, this bug remains as of 2.45.0.
Abacn commentedon Feb 7, 2023
I think I have reproduced the error: https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV2_PR/151/
run on branch: 2504882
Example jobId:
2023-02-07_11_45_58-12188672903944898798in apache-beam-testing gcp projectAbacn commentedon Feb 7, 2023
UpdateSchemaDestination created by #17365 has no comment nor doc string. This task should also add necessary comments to that class.
ahmedabu98 commentedon Feb 8, 2023
.take-issue
Abacn commentedon Feb 8, 2023
As @ahmedabu98 pointed out the original working example has typo. Initiated another job 2023-02-08_11_47_55-389031392081500435 branch: f446e5c
The problem is that the condition
beam/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/UpdateSchemaDestination.java
Line 263 in 69ddf44
is never true. The schema returned by DynamicsDestination object is:
schema by
destinationTable.getSchema()isthough they are effectively equivalent, and the temp table generated has the same schema on BigQueryUI, their gson representation is not the same.
Abacn commentedon Feb 8, 2023
I think I find the cause of the original issue (that in the issue description):
beam/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/UpdateSchemaDestination.java
Line 125 in 9fcb3a5
the processElement here does not consider the case of dynamic destination. It simply gets the first destination in the incoming list of element to setup zeroJob, and the outputs have have same destination.
Abacn commentedon Feb 8, 2023
The implementation of Java UpdateSchemaDestination and Python UpdateDestinationSchema is not the same. Python does not have this issue. In Python implementation both zero load job and copy job takes same PCollection as main input.
We should either change the java implementation to be same as Python, or make the input of UpdateSchemaDestination KV<DestinationT, Iterable<WriteTables.Result>> so each processElement deals with one destination.
ahmedabu98 commentedon Feb 10, 2023
Regarding above comment about the following line, just tested it and equality check works fine even though they have a different String representation:
beam/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/UpdateSchemaDestination.java
Line 263 in 69ddf44
Abacn commentedon Feb 11, 2023
ah I see, thanks for clarification. so pass either wrapped or unwrapped dynamic destination to UpdateSchemaDestination is fine.
ahmedabu98 commentedon Feb 13, 2023
We still would still want to wrap with match table dynamicdestinations because that's what we're doing when creating temp tables. For a given temp table, we want to pull the same schema consistently for both operations.