-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Atum Context, by getting existing partitioning from DB - retrieve Measures and AdditionalData for a given partitioning #120 #167
Conversation
…nalData-for-a-given-partitioning
… with the partitioning
…nd-AdditionalData-for-a-given-partitioning' into feature/#120-retrieve-Measures-and-AdditionalData-for-a-given-partitioning
…dditional_data function
…al_data function
…nalData-for-a-given-partitioning # Conflicts: # server/src/main/scala/za/co/absa/atum/server/Main.scala # server/src/main/scala/za/co/absa/atum/server/api/controller/PartitioningController.scala # server/src/main/scala/za/co/absa/atum/server/api/repository/PartitioningRepository.scala # server/src/main/scala/za/co/absa/atum/server/api/service/PartitioningService.scala
...scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala
Outdated
Show resolved
Hide resolved
...scala/za/co/absa/atum/server/api/database/runs/functions/GetPartitioningAdditionalData.scala
Outdated
Show resolved
Hide resolved
Addressed all the comment. |
450a45f
to
d1b6f7c
Compare
…#120-retrieve-Measures-and-AdditionalData-for-a-given-partitioning # Conflicts: # database/src/main/postgres/flows/V1.7.4__flows.alter.ddl # database/src/test/scala/za/co/absa/atum/database/runs/GetPartitioningAdditionalDataTest.scala # database/src/test/scala/za/co/absa/atum/database/runs/GetPartitioningMeasuresTest.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can be merged - the only thing I have is that we already have these 2 functions in the repository and I don't know what that would do to integration tests and/or Flyway, as their definitions are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest little comments don't warrant postponing the merge. It's good already. 😸
@@ -26,7 +26,9 @@ import zio._ | |||
class PartitioningControllerImpl(partitioningService: PartitioningService) | |||
extends PartitioningController with BaseController { | |||
|
|||
override def createPartitioningIfNotExists(partitioningSubmitDTO: PartitioningSubmitDTO): IO[ErrorResponse, AtumContextDTO] = { | |||
override def createPartitioningIfNotExists( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny:
Weird allignment
protected val partitioningDTO2: PartitioningDTO = Seq(PartitionDTO("Invali", "invalid"), PartitionDTO("invalid", "invalid")) | ||
protected val partitioningDTO1: PartitioningDTO = Seq( | ||
PartitionDTO("key1", "val1"), | ||
PartitionDTO("key2", "val2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, let it be. What I meant was, that a bigger variability in test cases (record count), would cover more of the testable space. But this is already good enough 😉
@@ -23,6 +23,6 @@ import zio.macros.accessible | |||
|
|||
@accessible | |||
trait PartitioningController { | |||
def createPartitioningIfNotExists(partitioning: PartitioningSubmitDTO): IO[ErrorResponse, AtumContextDTO] | |||
def createPartitioningIfNotExists(partitioningSubmitDTO: PartitioningSubmitDTO): IO[ErrorResponse, AtumContextDTO] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, good reason. It's just it's not the best idea to put the type name into the parameter/variable name (only with rare exceptions). Next time I would for example use submittedPartitioning: PartitioningSubmitDTO
.
But don't change it anymore! It's OK, good enough 😉
JaCoCo server module code coverage report - scala 2.13.11
|
Partitioning DB-Functions Calls
getPartitioningMeasures
andgetPartitioningAdditionalData
and implemented them.returnAtumContext
to package the above two methods includingcreatePartitioningIfNotExists
method in order to return the desired atum context.createOrUpdateAdditionalData
method as well.closes #120