Skip to main content
Answer

Modify existing instances and add time series reference via SDK

  • June 14, 2024
  • 1 reply
  • 44 views

Akash Sood
MVP
Forum|alt.badge.img+3

Hi team,

This is what I am trying to achieve:

I have written a function to create a new time series (in case it is not already created) and insert data points into it.

The newly created timeseries needs to be added to a solution data model I have created.

type ESPInputs @view(space: "workflow-sdm-spc", version: "1_0") {

    well:Well

    pump: ESP,

    operatingFrequency: TimeSeries,

    voltage: TimeSeries,

    pumpIntakePress: TimeSeries,

    pumpDischargePress: TimeSeries,

    motorWindingTemp: TimeSeries,

    current: TimeSeries,

    vibration: TimeSeries,

    torque: TimeSeries,

    pmm: TimeSeries,

    operatingFrequencyPmm: TimeSeries

}

The instances under this view are already present. The newly created time series need to be references to the property pmm that are filtered via well property (I have well external Id and pmm time series external id available with me in the function).

I think I need to update the instance in the apply instance as per the documentation, but I am unable to find an update instance example. I don’t want to update existing data for other properties for the instance, just add the reference for the pmm property.

Thanks,

Akash

Best answer by Akash Sood

I think I have asked this in the wrong page. I have re-asked this in Cognite Hub

1 reply

Akash Sood
MVP
Forum|alt.badge.img+3
  • Author
  • MVP
  • Answer
  • June 14, 2024

I think I have asked this in the wrong page. I have re-asked this in Cognite Hub