fixed id prefix creation for the fosnodoi records
This commit is contained in:
parent
69c5efbd8b
commit
e1a0fb8933
|
@ -80,9 +80,10 @@ public class PrepareFOSSparkJob implements Serializable {
|
||||||
|
|
||||||
fosDataset
|
fosDataset
|
||||||
.groupByKey((MapFunction<FOSDataModel, String>) v -> v.getOaid().toLowerCase(), Encoders.STRING())
|
.groupByKey((MapFunction<FOSDataModel, String>) v -> v.getOaid().toLowerCase(), Encoders.STRING())
|
||||||
.mapGroups((MapGroupsFunction<String, FOSDataModel, Result>) (k, it) -> {
|
.mapGroups(
|
||||||
return getResult(ModelSupport.getIdPrefix(Result.class) + "|" + k, it);
|
(MapGroupsFunction<String, FOSDataModel, Result>) (k,
|
||||||
}, Encoders.bean(Result.class))
|
it) -> getResult(ModelSupport.entityIdPrefix.get(Result.class.getSimpleName()) + "|" + k, it),
|
||||||
|
Encoders.bean(Result.class))
|
||||||
.write()
|
.write()
|
||||||
.mode(SaveMode.Overwrite)
|
.mode(SaveMode.Overwrite)
|
||||||
.option("compression", "gzip")
|
.option("compression", "gzip")
|
||||||
|
|
Loading…
Reference in New Issue