I'm working with the Python API and have a questio...
# troubleshooting
m
I'm working with the Python API and have a question about event timestamps. I'm trying to window based on event time. Events are coming from a Kafka source but I'd like to use a field from the JSON payload as event time. It's my understanding that I should provide an implementation of TimestampAssigner for this purpose and implement the extract_timestamp method. Question is, what data type or datetime format should that method return?
d
@Mikko Lehtimäki It should return an
int
. See the signature https://github.com/apache/flink/blob/master/flink-python/pyflink/common/watermark_strategy.py#L162 for details.
m
Thanks! I'm having trouble getting output from TumblingEventTimeWindows, so I figured maybe I had incorrect type.