Hi all. I must send to kafka json that is an array...
# troubleshooting
n
Hi all. I must send to kafka json that is an array of elements, so it looks like:
Copy code
[
{...},
{...}
]
I now got
Copy code
dataStream
                .map(List::of)
                .sinkTo(calcSink);
It work well without map but with map(List::of) I got error
Copy code
Generic types have been disabled in the ExecutionConfig and type java.util.List is treated as a generic type.
And I don't understand how to manage that Additional returns() not change anything
Copy code
dataStream
                .map(List::of)
                .returns(TypeInformation.of(new TypeHint<>() {
                }))
                .sinkTo(calcSink);
Solution found:
Copy code
dataStream
                .map(List::of)
                .returns(Types.LIST(TypeInformation.of(Data.class)))
                .sinkTo(calcSink);