1
0
Fork 0

reverted procedure for creating the UsageCounts actionset

This commit is contained in:
Claudio Atzori 2024-10-01 15:54:13 +02:00
parent 5734b80861
commit 10696f2a44
1 changed files with 1 additions and 4 deletions

View File

@ -112,10 +112,7 @@ public class SparkAtomicActionUsageJob implements Serializable {
.joinWith(datasource, resultModel.col("datasourceId").equalTo(datasource.col("id")), "left")
.map((MapFunction<Tuple2<UsageStatsResultModel, Datasource>, UsageStatsResultModel>) t2 -> {
UsageStatsResultModel usrm = t2._1();
if (Optional.ofNullable(t2._2()).isPresent())
usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue());
else
usrm.setDatasourceId(usrm.getDatasourceId() + "||NO_MATCH_FOUND");
usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue());
return usrm;
}, Encoders.bean(UsageStatsResultModel.class))
.write()