Closed janhicken closed 6 years ago
I am also struggling with the exact same issue. It seems like something is wrong. when using avro dynamic destination (for instance), this is not a problem.
have a look here: https://github.com/apache/beam/pull/4319
It is definitely an error: https://stackoverflow.com/a/47946587/3715815
Great, that PR will fix the issue, I'm closing this one then.
Hi,
I'm using the Dataflow Java SDK 2.2.0 in order to write data to GCS. I need to write data into different files grouped by some key. To do so, I implemented my own
FileBasedSink.DynamicDestinations
class, which determines the destination file withgetDestination(String)
.However, at that point, I already stringified my POJO class, which makes retrieving the key to group by quite difficult, I'd like to just call
myPojo.getGroup()
or so. At that point, I encounteredTextIO.writeCustomType
, which makes my POJO type available in the implementation ofDynamicDestinations
. I can now implement my Stringification of the record informatRecord(UserT)
.When settings a
DynamicDestinations
object to theTypedWrite
, the corresponding methodTypedWrite.to<NewDestinationT>(DynamicDestinations)
expected theDynamicDestinations
object to still useVoid
as destination type, which is the default when creating aTypedWrite
viaTextIO.writeCustomType
. I think the corresponding method signature should beinstead of
Kind regards, Jan