From 450a45f4d518588091737b6fd5ff19c84eac9e11 Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Thu, 25 Apr 2024 18:12:58 +0200 Subject: [PATCH] #120: ignoring status-related fields for now, not supported like this by current fa-db version (but will be soon) --- .../runs/functions/GetPartitioningAdditionalData.scala | 3 +++ .../api/database/runs/functions/GetPartitioningMeasures.scala | 2 ++ 2 files changed, 5 insertions(+) diff --git a/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala b/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala index b6142f2d0..348503e3c 100644 --- a/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala +++ b/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala @@ -34,6 +34,9 @@ import za.co.absa.atum.server.api.database.DoobieImplicits.getMapWithOptionStrin class GetPartitioningAdditionalData (implicit schema: DBSchema, dbEngine: DoobieEngine[Task]) extends DoobieMultipleResultFunction[PartitioningDTO, (String, Option[String]), Task] { + + override val fieldsToSelect: Seq[String] = Seq("ad_name", "ad_value") + import za.co.absa.atum.server.api.database.DoobieImplicits.Jsonb.jsonbPutUsingString override def sql(values: PartitioningDTO)(implicit read: Read[(String, Option[String])]): Fragment = { val partitioning: PartitioningForDB = PartitioningForDB.fromSeqPartitionDTO(values) diff --git a/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningMeasures.scala b/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningMeasures.scala index 9a9161cf9..26274eac0 100644 --- a/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningMeasures.scala +++ b/server/src/main/scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningMeasures.scala @@ -36,6 +36,8 @@ class GetPartitioningMeasures (implicit schema: DBSchema, dbEngine: DoobieEngine { import za.co.absa.atum.server.api.database.DoobieImplicits.Jsonb.jsonbPutUsingString + override val fieldsToSelect: Seq[String] = Seq("measure_name", "measured_columns") + override def sql(values: PartitioningDTO)(implicit read: Read[MeasureDTO]): Fragment = { val partitioning = PartitioningForDB.fromSeqPartitionDTO(values) val partitioningJsonString = Json.toJson(partitioning).toString