Skip to main content
Question

PDM Transformation - CDM to PDM asset reference

  • February 10, 2026
  • 2 replies
  • 11 views

Sharizan Mohd Redzuan
Seasoned
Forum|alt.badge.img+4

Hi ,

 I have the CogniteActivity in the CDM/EDM data model which the assets is part of the model:

 

Below is the sample data of CogniteActivity:

This is the data model for Event in PDM:

I tried to transform from CDM/EDM to PDM using below transformation, but i am not sure what is the script to transform CogniteActivity to PDM Event:

And i got below error:

 

Anyone know how can I transform CDM/EDM asset node reference to Event entities attribute?

 

Thank you.

2 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8
  • Seasoned Practitioner
  • February 10, 2026

@Sharizan Mohd Redzuan I’m not sure whether this will work but can you try to replace struct(...) with named_struct(...) and name the fields correctly in your SQL query:

named_struct(
'space', 'slb-pdm-di-governed',
'externalId', 'OPERATION.WORK_ORDER'
) as type,

 


Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • February 10, 2026

Hi ​@Sharizan Mohd Redzuan 

 

It seems entities is modeled as an edge, which you would need to populate using a separate transformation selecting the target to be the edge type. 

Each edge has as startNode and endNode, which are node references. To express this in the sql query you will use node_reference. (documentation), that takes the space and externalId for each node. 

 

So conceptually the sql becomes:

 

select 
    node_reference(space, externalId_startNode) as startNode,
    node_reference(space, externalId_endNode) as endNode,
    "externalId_of_edge" as externalId

 

Hope this helps,

 

 

Regards

 

Arild Eide