I'm using Apache Beam with Scala. To create new ParquetIO.Sink
instances with the respective schemas for the different types of streaming data, I'm trying to call .via(Contextful, Contextful)
on FileIO.Write
. However, IntelliJ cannot find the overloaded method that I'm trying to use and raises this error: Cannot resolve overloaded method 'via'
.
FileIO
.writeDynamic[String, DeserializedEvent]()
.by(new UDFs.PartitionByEventName())
.withDestinationCoder(StringUtf8Coder.of())
.withNumShards(numShards)
.withNaming(new UDFs.NameFiles())
.via(
Contextful.fn[DeserializedEvent, GenericRecord](
new UDFs.EventToGenericRecord() // SerializableFunction[DeserializedEvent, String]
),
Contextful.fn[String, ParquetIO.Sink](
new UDFs.SinkParquet() // SerializableFunction[String, ParquetIO.Sink]
)
)
.to(path)
What's the issue here?
Thanks