Change data structure for meteo adding AggregateKey and AggregateValue

This commit is contained in:
Guntis Smaukstelis
2023-04-26 16:37:11 +03:00
parent 3cd223dddd
commit 1bf41973a7
7 changed files with 161 additions and 62 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package parse
import cats.effect.IO
import cats.effect.unsafe.implicits.global
import io.circe.syntax.EncoderOps
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
@@ -16,8 +17,8 @@ object Main {
for {
lines <- db.DBService.getInRange(from, to)
parsed <- IO.pure(Parser.queryData(lines, List("Liepāja", "Rēzekne", "randomstr"), AggregateMeteo.tempAvg))
_ <- IO.println(parsed)
parsed <- IO.pure(Parser.queryData(lines, List("Liepāja", "Rēzekne", "randomstr"), AggregateKey.tempMax))
_ <- IO.println(parsed.asJson)
} yield ()
}