Konstantinos Samaras-Tsakiris
03/10/2023, 1:57 PMdeviceTimestamp as ROWTIME:
streamTableEnv.create_table("source",
.schema(Schema.new_builder()
.column('deviceTimestamp' ...)
...
.watermark('deviceTimestamp', "deviceTimestamp - INTERVAL '0.04' SECOND")
2. then join it with the output of a UDTF that adds a new sampleTimestamp column
3. then try to perform a window operation on the sampleTimestamp column
I realize that I can't do this because windowing can only happen on the ROWTIME column.
Do you know how I can transform the ROWTIME column, to be sampleTimestamp instead of deviceTimestamp?Konstantinos Samaras-Tsakiris
03/10/2023, 2:01 PMstreamTableEnv.create_temporary_table("splatSamples",
.schema(Schema.new_builder()
.column('deviceTimestamp' ...)
.column('sampleTimestamp' ...)
...
.watermark('sampleTimestamp', "sampleTimestamp - INTERVAL '0.04' SECOND")
streamTableEnv.from_path("source")
.join_lateral(my_udtf, ...)
.execute_insert("splatSamples")
streamTableEnv.from_path("splatSamples")
.window(Slide ...
.on(col("sampleTimestamp"))
The problem with this approach is that I don't know what connector to use for the splatSamples table. I don't need the data to exit Flink. Is there a way to define this intermediate table without a connector?Dian Fu
03/11/2023, 1:48 PMsampleTimestamp as ROWTIME column [1] and perform window operation on it
[1] https://github.com/apache/flink/blob/master/flink-python/pyflink/examples/table/windowing/tumble_window.py#L49Konstantinos Samaras-Tsakiris
03/11/2023, 2:58 PM