Skip to main content
Answer

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

  • December 19, 2023
  • 2 replies
  • 66 views

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. 

Best answer by Dilini Fernando

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

2 replies

Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • January 3, 2024

Hi @Ivan Cherednikov,

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

Br,
Dilini


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • Answer
  • January 11, 2024

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