Hi, Tauseef.
This is an example to use custom POJO with flatmap[1].  If possible, can you 
post your code and tag the flink version?




At 2023-11-21 22:48:41, "Tauseef Janvekar" <tauseefjanve...@gmail.com> wrote:

Dear Team,

I am getting the following error while using flatMap.
Caused by: org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error: The return type of function 
'defineWorkflow(OtelTransformerJob.java:75)' could not be determined 
automatically, due to type erasure. You can give type information hints by 
using the returns(...) method on the result of the transformation call, or by 
letting your function implement the 'ResultTypeQueryable' interface.

On further investigation I found that flatMap should end with 
.returns(Types.STRING) when the return type is a STRING.

My question is if my return type is a custom DTO named mypckg.MyCustomDTO then 
how do I pass parameters to returns method.


Reply via email to