cognitedata / cdf-sdk-java

Java SDK for Cognite Data Fusion
Apache License 2.0
4 stars 8 forks source link

transformations: add support for data model destination type #363

Closed dsorenes closed 9 months ago

dsorenes commented 9 months ago

Adds support for handling the data model destination. We need this in our project in order to see which type the transformation is writing to. I've tested this with both a RAW transformation and a data model transformation.

Old transformation:

id: 25564067
uuid: "dfb67644-2b78-4a7a-8c13-77301ab9e1f5"
transformation_id: 20212
transformation_external_id: "tr-lci:UnitOfMeasure"
source_project: "akerbp-dev"
destination_project: "akerbp-dev"
conflict_mode: "tl:dr"
created_time: 1707837423707
started_time: 1707837425152
finished_time: 1707837426349
last_seen_time: 1707837425782
status: "Completed"

new (RAW):

id: 25564075
uuid: "0de68168-44cd-4002-b08a-a6bb14cdacc7"
transformation_id: 22889
transformation_external_id: "tr-lci_export:pbi_Property"
source_project: "akerbp-dev"
destination_project: "akerbp-dev"
destination {
  type: "raw"
  database: "lci-export"
  table: "Property"
}
conflict_mode: "tl:dr"
created_time: 1707837564960
started_time: 1707837566617
finished_time: 1707837569966
status: "Completed"

new (data model):

id: 25564071
uuid: "84f000b8-019a-4151-8fac-68340b575ea1"
transformation_id: 20212
transformation_external_id: "tr-lci:UnitOfMeasure"
source_project: "akerbp-dev"
destination_project: "akerbp-dev"
destination {
  type: "instances"
  data_model {
    space: "yggdrasil-twin"
    external_id: "yggdrasil_twin"
    version: "12"
    destination_type: "UnitOfMeasure"
  }
  instance_space: "yggdrasil-twin"
}
conflict_mode: "tl:dr"
created_time: 1707837482015
started_time: 1707837483330
finished_time: 1707837484371
status: "Completed"
dsorenes commented 9 months ago

I'm still not sure about the release process, but will investigate that before doing a release.