Hey Team, I have a flow like Kafka Sink Datastream -> Process Function (Separate Class) -> DBSink(Separate Class).
Process Function returns me the output as a string and now I want to create a DataStream out of the string variable so that I can call something like ds.addSink(new DBSink()). For that, I used the StreamExecution variable as a global /method variable but I am not able to create it properly. What is happening is, if I don't create a data stream properly it doesn't call the sink properly because it doesn't execute the methods under the Sink class which is according to Fabian's answer in the below post: https://stackoverflow.com/questions/41210266/apache-flink-use-values-from-a-data-stream-to-dynamically-create-a-streaming-d How can I fix this? Or else, I will have to create normal classes and call the DB methods which is inappropriate because it will create and close connection per record which is again an expensive operation in practice. Thanks, Sid