DataStream<String> sourceStream = streamEnv.fromElements("key_a", "key_b", "key_c", "key_d");
Table lookupTable = tableEnv.fromValues(
DataTypes.ROW(
DataTypes.FIELD("my_key", DataTypes.STRING()),
DataTypes.FIELD("my_value", DataTypes.STRING())
),
Expressions.row("key_a", "value_a"),
Expressions.row("key_b", "value_b")
);
I'd like to left join the stream to the table.
This is obviously a simplified demo scenario. I'd like to understand how to use the Flink API to achieve this with a toy data set before using a larger production data set.
The docs on Table joins shows how to join two tables and get another table back, which is not what I want:
https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/tableApi.html#joins
The docs on DataStream joins shows to join two streams on a time window, which is also not what I want:
https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/stream/operators/joining.html