One result linked to more than on project is saved just once

pull/151/head
Miriam Baglioni 3 years ago
parent 320cf02d96
commit 886617afd0

@ -97,6 +97,11 @@ public class SparkResultLinkedToProject implements Serializable {
"on rel.target = p.id " +
"")
.as(Encoders.bean(inputClazz))
.groupByKey(
(MapFunction< R, String>) value -> value
.getId(),
Encoders.STRING())
.mapGroups((MapGroupsFunction<String, R, R>) (k, it) -> it.next(), Encoders.bean(inputClazz))
.write()
.mode(SaveMode.Overwrite)
.option("compression", "gzip")

Loading…
Cancel
Save