Commit 65cc0a8b authored by Jonas Waeber's avatar Jonas Waeber

Remove empty transforms from the output

parent 856d80a4
Pipeline #9935 passed with stages
in 3 minutes and 55 seconds
......@@ -113,10 +113,12 @@ class KafkaTopology(private val settings: SettingsLoader) {
records
.map { _, value -> KeyValue(value.first.first, value.first.second) }
.filter { _, value -> value.isNotEmpty() }
.mapValues { value -> value.toJsonString() }
.to(settings.outputTopic)
records
.filter { _, value -> value.first.second.isNotEmpty() }
.map { _, value -> KeyValue(value.second.id, value.second) }
.mapValues { value -> Klaxon().toJsonString(value) }
.to(reportingTopic)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment