Solved

Ability to fetch Cognite resources that are not contained in a dataset

  • 19 December 2023
  • 2 replies
  • 58 views

Userlevel 1

Hello! Was looking around and cleaning some data, and came upon the realization that I can’t find out of you can access Cognite resources that are not contained in a dataset. That is, is there an ability to find/fetch/list Cognite resources that are “floating free”.

I have tried setting 

  • data_set_ids 

And

  • data_set_external_ids 

To None, but this is the same as not having specified it. 

icon

Best answer by Dilini Fernando 11 January 2024, 11:15

View original

2 replies

Userlevel 4
Badge +2

Hi @Ivan Cherednikov,

I have created a Support ticket, so our team can follow up and help you. 

Br,
Dilini

Userlevel 4
Badge +2

Hi @Ivan Cherednikov,

I have noticed that the support ticket has been resolved using the following code.

from cognite.client.data_classes import filters
client.events.filter(
filter=filters.Not(
filters.Exists("dataSetId")
),
sort=["externalId"] # You can change "externalId" to any valid property for sorting

As of now, I will close this thread. If you have any questions, please feel free to create a new post.

Br,
Dilini

Reply