Skip to main content
Solved

AttributeError: 'DataSetsAPI' object has no attribute 'search'

  • November 1, 2024
  • 3 replies
  • 26 views

sebastiansrikanth
Active
Forum|alt.badge.img

Hi Team,

I'm excited to be registered for the Data Engineer Basics course, specifically the “Learn to Use the Cognite Python SDK” section!

While working through the “List, Search, Retrieve” portion, I came across an issue. The documentation states that the general pattern for search operations is `client.<cdf_resource_type>.search()`, where `<cdf_resource_type>` could be `data_sets`, `asset`, `time_series`, `events`, `files`, `labels`, and so on.

Following this, I tried the code:

```python
c.data_sets.search()
```

However, it resulted in the following error:

```
AttributeError: 'DataSetsAPI' object has no attribute 'search'
```

I double-checked the Python SDK documentation but couldn't locate a `search()` function for `data_sets`. Could you please let me know if I missed something? And if the `search` function for `data_sets` is indeed unavailable, perhaps it could be noted in the documentation to prevent future confusion?

Thank you for your help and for the informative course!

 

Best regards,  
Sebastian Srikanth Kumar

Best answer by Mithila Jayalath

@sebastiansrikanth Thank you for sharing the documentation. Datasets does not have an search endpoint currently. I’ll inform the Academy team regarding this and they will update the course content. 

Thanks again for reporting this. Feel free to reach out if you have any questions along the way. Best of luck with the course.

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

3 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

@sebastiansrikanth can you please share the documentation that you referred to?


sebastiansrikanth
Active
Forum|alt.badge.img

Hi @Mithila Jayalath,

Thank you for your response 

 

Hope you are doing well !

 

 

Here is the link:
https://learn.cognite.com/path/data-engineer-basics-integrations/learn-to-use-the-cognite-python-sdk/1963095


Also attaching the screenshot for your reference.
 

 


I really like the documentation, I am learning a lot through this. Love it !

Thanks and have a great day ahead :)

 


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • 369 replies
  • Answer
  • November 3, 2024

@sebastiansrikanth Thank you for sharing the documentation. Datasets does not have an search endpoint currently. I’ll inform the Academy team regarding this and they will update the course content. 

Thanks again for reporting this. Feel free to reach out if you have any questions along the way. Best of luck with the course.


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