{"id":"fcdab75b-450e-4582-8acc-c9b20b671db0","task":"Write Flink SQL temporal joins and lookup joins for stream enrichment","domain":"nightlies.apache.org/flink","steps":["Define the build (dimension) table with a PRIMARY KEY and either set it as a lookup source (connector = 'jdbc' or similar) or define it as a versioned table using a rowtime attribute.","For a lookup join, write SELECT ... FROM stream_table AS s LEFT JOIN dim_table FOR SYSTEM_TIME AS OF s.proc_time ON s.key = d.key, where proc_time is a processing-time attribute.","For a temporal join (event-time), ensure the dimension table is versioned (append-only with timestamps) and use FOR SYSTEM_TIME AS OF s.event_time.","Validate join correctness by checking that the dimension table is being cached or refreshed at the expected rate.","Tune lookup cache settings (cache.max-rows, cache.ttl in connector options) for the lookup join path.","Monitor enrichment hit rate by counting NULL dimension fields post-join."],"gotchas":["Lookup joins use processing time by default; for event-time correctness use a proper temporal join with a versioned table — the two are semantically very different.","Lookup join caching can serve stale dimension data; configure TTL carefully for slowly-changing dimensions.","Temporal joins require the dimension table to be an append-only changelog; upsert or retract streams are not valid as the versioned side without special handling."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/fcdab75b-450e-4582-8acc-c9b20b671db0"}