[broker] added coalesce(1) on the stats dataset before storing it on postgres

This commit is contained in:
Claudio Atzori 2021-07-09 15:47:51 +02:00
parent c30f3ce647
commit ae2b47b29d
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ public class GenerateStatsJob {
.map(
(MapFunction<Tuple2<String, DatasourceStats>, DatasourceStats>) t -> t._2,
Encoders.bean(DatasourceStats.class))
.coalesce(1)
.write()
.mode(SaveMode.Overwrite)
.jdbc(dbUrl, "oa_datasource_stats_temp", connectionProperties);