2

What I am trying to do is, I am fetching the data from different source and doing grouping and join on them and after that I am getting result in BatchStage and now I have to perform python code on this function but I am not able to do it.

Here is my below code:

BatchStage<List<Map<String, Object>>> bd = AggregateData.aggregate(data, Object);
bd1 = bd1.filter(k -> {
                        // some filters
                    });
// Now here after this I want to execute python code:
bd1.apply(mapUsingPython(new PythonServiceConfig()
                                     .setBaseDir("D:/")
                                     .setHandlerModule("take_sqrt")))
                             .setLocalParallelism(1)
                             .writeTo(Sinks.logger());

But it is now allowing as I am new to this I am not getting exact syntax, please help me out

user3458271
  • 638
  • 12
  • 31

1 Answers1

3

mapUsingPython transforms BatchStage<String> to BatchStage<String>, so you first have to explicitly convert your List<Map<String, Object>> to string representation.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436