This article will explain how to access the data from the Open Industrial Data Project (OID), through the Cognite Python SDK, with authentication through an interactive login token from Cognite Hub’s Azure Active Directory. The video in the article will step by step show you how you can get access to the data, and also link to the relevant information you will need.
- Install or update the following python modules/libraries
pip install cognite-sdk
pip install msal
pip install pandas
- Open a Jupyter Notebook or python file and import the publicdata.py
from publicdata import c
- Access the OID CDF project through the CogniteClient object: c, and when the first method is called on the CogniteClient object it will authenticate and redirect towards the AAD tenant and use the received credentials to access the CDF project. try by listing some of the CDF resource types below:
c.assets.list() #to list assets
c.time_series.list() #to list timeseries
- Enjoy, innovate and be creative with programmatic access to the industrial data in Open industrial data project.
This following the video and this method you must use Python 3.8.0 or higher and uses the cognite-sdk version 4.2.1
Hope this was helpfull, for more info write a reply or check out docs.cognite.com