0

Is it possible to add a new record/row to a flink table? For example i have the following table configuration:

ExecutionEnvironment env = TableEnvironmentLoader.getExecutionEnvironment();
BatchTableEnvironment tableEnv = TableEnvironmentLoader.getBatchTableEnvironment();

Table subscribers = tableEnv.fromDataset(subscribers, "firstName, lastName, age");

tableEnv.registerTable("subscribers", subscribers);

Now let's assume at a later point i have an additional dataset or tuple3 that contains the same fields; firstName, lastName, age. How can i add that to the existing flink subscribers table? Will using a dynamic table or another way of registering the table (for example: tableEnv.registerTemporaryView("subscribers", subscribers)) solve the issue? I am not able to add another record to this table without dropping it and creating it again and that is too costly.

please share answer in java.

1 Answers1

0

It sounds like what you want is to use a dynamic table in a StreamTableEnvironment. The whole point of a dynamic table is that it can be continuously updated.

For a solid intro to Flink SQL, I recommend https://www.youtube.com/watch?v=UnCkwIp_614.

David Anderson
  • 39,434
  • 4
  • 33
  • 60