Hi Team, We are trying to write a UDF to be used i...
# troubleshooting
a
Hi Team, We are trying to write a UDF to be used in flink sql job. UDF will need to dedupe the events such that we can count unique impressions of device_id per hour. I have read this - https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/functions/udfs/ but not able to understand how to use flink state in this How can I store the information(list of device_ids at hour level) in the flink state? So that even if I restart the job, my job is still able to produce the correct impression counts
m
Why would you write a custom UDF since there's a deduplication SQL already in Flink?
a
We wanted to support late events upto 36hours, we were not sure how to do this using this Sharing the complete usecase with you
We are getting impressions from our app and we want to track unique impressions by device_id hourly. While the deduplication works on hour level, we publish the data every minute. We support late events upto 12hrs Questions: - Not sure how to support late events in flink sql. I checked out this PR - https://github.com/apache/flink/pull/16022. But didn't find any documentation for this - Can https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/window-tvf/ work for this usecase?
m
All late events for Table API and SQL are dropped, see https://issues.apache.org/jira/browse/FLINK-10031
a
ohh ok, but can I dedupe at 1 hour window and emit events every minute using window-tvf?