Is there an easy way to do a simple `Lookup Join` ...
# troubleshooting
p
Is there an easy way to do a simple
Lookup Join
on a table backed by
upsert-kafka
? I tried using a temporal join based on `PROCTIME`but this gave me various exceptions, that this is not supported. In the end, all I want is to join the data from one table with the latest available value from the upserted table. (I don't need the data from the time of the entry or something like shown in the currency examples around this topic)
p
I think the temporal join is indeed the way to go. I used
FOR SYSTEM_TIME AS OF
being my timestamp record instead of
PROCTIME
. Which exceptions are you getting? Last time I build something that needed a lookup join I decided to use DataStreamAPI to have full control over the state of the lookup tho.
p
I tried to Watermark the upsert table based on the PROCTIME, which gives me
org.apache.flink.table.api.ValidationException: A watermark can not be defined for a processing-time attribute.
I think I found a solution btw, I just hard-coded the timestamp for the lookup stream like this
Copy code
fixed_time AS TO_TIMESTAMP('1970-01-01 00:00:00.000'),
WATERMARK FOR fixed_time AS fixed_time,
Which than allows me to do a normal termporal join but gives me pretty much exactly what I want as a result
🙌 1