Skip to content

Commit

Permalink
feat: retrieve and include extra field in GET /execution-events (#1339)
Browse files Browse the repository at this point in the history
* feat: retrieve and include extra field in GET /execution-events

* Add labels to execution events response

* Response type should match db shape

* Update consumer-services/src/main/scala/za/co/absa/spline/consumer/service/model/WriteEventInfo.scala

* Update consumer-services/src/main/scala/za/co/absa/spline/consumer/service/model/WriteEventInfo.scala

---------

Co-authored-by: Seth Jones <[email protected]>
Co-authored-by: sethj-pantomath <[email protected]>
Co-authored-by: Alex Vajda <[email protected]>
  • Loading branch information
4 people authored Jun 25, 2024
1 parent caf24c1 commit de82e68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package za.co.absa.spline.consumer.service.model
import io.swagger.annotations.ApiModelProperty
import za.co.absa.spline.persistence.model.Progress

import java.{util => ju}

case class WriteEventInfo
(
@ApiModelProperty(value = "Id of the execution event")
Expand All @@ -43,9 +45,13 @@ case class WriteEventInfo
@ApiModelProperty(value = "Output data source (or data) type")
dataSourceType: String,
@ApiModelProperty(value = "Write mode - (true=Append; false=Override)")
append: WriteEventInfo.Append
append: WriteEventInfo.Append,
@ApiModelProperty(value = "Other extra info")
extra: Map[String, Any],
@ApiModelProperty(value = "Execution event labels")
labels: Option[Map[Label.Name, ju.List[Label.Value]]],
) {
def this() = this(null, null, null, null, null, null, null, null, null, null, null, null)
def this() = this(null, null, null, null, null, null, null, null, null, null, null, null, null, null)
}

object WriteEventInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ class ExecutionEventRepositoryImpl @Autowired()(db: ArangoDatabaseAsync) extends
| "dataSourceType" : ee.execPlanDetails.dataSourceType,
| "append" : ee.execPlanDetails.append,
| "durationNs" : ee.durationNs,
| "error" : ee.error
| "error" : ee.error,
| "extra" : ee.extra,
| "labels" : ee.labels
| }
|
| SORT resItem.@sortField @sortOrder
Expand Down

0 comments on commit de82e68

Please sign in to comment.