I am struggling to figure out what how I can resolve an issue I am seeing with this data flow job. I saw a similar thread on the apache beam archives question thread but I did not quite understand how to use this information.
Essentially data is being streamed into Big Query (which works), I am trying to write these BQ rows into spanner in the same dataflow job which raises the following runtime exception:
java.lang.IllegalArgumentException: Attempted to get side input window for GlobalWindow from non-global WindowFn
org.apache.beam.sdk.transforms.windowing.PartitioningWindowFn$1.getSideInputWindow(PartitioningWindowFn.java:47) ....
The relevant section of the data flow graph can be seen here data flow graph and the code I am using to write to spanner is here:
sensorReports
.apply("WindowSensorReportByMonth",
Window.<TableRow>into(FixedWindows.of(Duration.standardMinutes(5))).withAllowedLateness(Duration.ZERO).discardingFiredPanes()
.triggering(AfterProcessingTime.pastFirstElementInPane()
.plusDelayOf(Duration.standardMinutes(1)))
.discardingFiredPanes())
.apply("CreateSensorReportMutation", ParDo.of(new RowToMutationTransform()))
.apply("Write to Spanner",
SpannerIO.write()
.withDatabaseId(propertiesUtils.getSpannerDBId())
.withInstanceId(propertiesUtils.getSpannerInstanceId())
.withProjectId(propertiesUtils.getSpannerProjectId())
.withBatchSizeBytes(0));