Skip to main content
Solved

CDF DataModel - Querying data using c# CogniteSdk

  • February 17, 2025
  • 4 replies
  • 83 views

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

I am using CogniteSdk c# to query data model from CDF.

 

When I tried to execute it, it did not return row items. Instead it just returned below result:

What is the correct way to use the DataModel in C# CogniteSdk to return rows of data as per below?

 

Best answer by Einar Omang

It’s hard to say for sure. It may be a naming issue, you can see what the method returns if you parametrize it with something like `JsonElement` instead of `WellResponse`.

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

4 replies

  • Practitioner
  • 68 replies
  • February 17, 2025

The C# SDK is just a wrapper around the API. You will have to process the returned instances into the output shape you want yourself.


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

Hi Einar,

The problem is the data is not returning and it showing null as per below example. How can i make sure it does return the data and not returning null?

 


  • Practitioner
  • 68 replies
  • Answer
  • February 17, 2025

It’s hard to say for sure. It may be a naming issue, you can see what the method returns if you parametrize it with something like `JsonElement` instead of `WellResponse`.


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

Hi Einar,

Thanks for the tip. After replace with JsonElement, seems like there a few layer of parent before can reach the actual parameters as below. Thanks for the help.

 

 


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