Skip to main content
Solved

Cognite FDM - Inserting Edge Instance


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

I am trying to use the CogniteSdk in c# to build my FDM model node and egde. I able to insert the node accordingly but having issue when trying to define the edge. As you can see below , to create an edge, it require the "Type" to be define. There is no error but when i check my UserDashboard model, it cannot link to my DashboardItem. 

Anyone know how we can insert Edge using C# SDK?

 

FDM:

type UserDashboard @view(version: "c3020ef716088a") {

 userId: String!

 createdDateTime: Timestamp

 lastUpdateDatetime: Timestamp

 dashboard: [DashboardItem]

}

type DashboardItem @view(version: "62c414860c7734") {

 userId: String!

 index: Int!

 id: Int!

}

 

UserDashboard

 

DashboardItem

 

Best answer by Sharizan Mohd Redzuan

Hi Guys,

I have found the solution myself on how to make the link between the node and I’s direct relationship. In order to make it connect, we have to check the container info of the reference that we define in the model. We have to turn on the “Container info” option and from there we can see the actual name of the fields.

Then we can use the name as the externalId of our edge in the SDK as below:

Is everything is okay, we can see the model instance will be linked as expected.

 

View original
Did this topic help you find an answer to your question?

2 replies

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

Hi Guys,

I have found the solution myself on how to make the link between the node and I’s direct relationship. In order to make it connect, we have to check the container info of the reference that we define in the model. We have to turn on the “Container info” option and from there we can see the actual name of the fields.

Then we can use the name as the externalId of our edge in the SDK as below:

Is everything is okay, we can see the model instance will be linked as expected.

 


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

@Sharizan Mohd Redzuan Great work! Thank you for sharing the solution with the community.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings