Hey
@Ilya Sterin, intermediate jobs will make it easier to operate and can give you better insight into what is going on. But the combinatorial explosion of multi-way joins may still become an issue and you may end up kicking the can just a little further down the road. Maybe temporal joins can help you here.
Let's say you have an "adverse drug reaction" event with the schema (event_id, timestamp, event_type, event_message, patient_id) and you want to join it with the patient table, the patient-site-assignment table, the site table, the site-study-assignment table, and the study table. As an inner join, this 6 way join can become a memory issue. As a temporal join it won't be an issue because you are joining the event with the other dimensional tables at the point in time of the event which allows Flink to free up memory quickly. For context augmentation, temporal joins are the way to go imho.
DataSQRL might make this a lot easier for you. It's a open-source compiler for Flink that distinguishes between stream/event and state tables and automatically picks the best join type. It also makes it easy to export intermediate results for reuse if you want to break up that massive join you are working on. But you can also do this directly in
Flink.