Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
There is a problem in fetching raw tables records through SDK. This was working till last week and something has changed now. client.raw.rows.retrieve_dataframe(db_name="Eashwar_MOTDB-db",table_name="lp_input",limit=None)Now getting this error below. Please advise.--------------------------------------------------------------------------MissingSchema Traceback (most recent call last)Cell In[6], line 1----> 1 client.raw.rows.retrieve_dataframe(db_name="Eashwar_MOTDB-db",table_name="lp_input",limit=None,columns=None)File /lib/python3.11/site-packages/cognite/client/_api/raw.py:538, in RawRowsAPI.retrieve_dataframe(self, db_name, table_name, min_last_updated_time, max_last_updated_time, columns, limit) 514 """`Retrieve rows in a table as a pandas dataframe. <https://developer.cognite.com/api#tag/Raw/operation/getRows>`_ 515 516 Rowkeys are used as the index. (...) 535 >>> df = c.raw.rows.retrieve_dataframe("db1", "t1",
Hello esteemed members of the Cognite community,I come to you with a sense of urgency and a deep need for expert guidance. I've been attempting to familiarize myself with Cognite for the last six months, and despite my best efforts, I find myself at an impasse with some critical aspects. My situation is time-sensitive, and I am truly hoping for your assistance to navigate this complex but fascinating journey.My Setup:Environment: Google Colab (Free version)SDK: Cognite Python SDKAssets: Wind Farm with two sub-assets (Asset A and Asset B)My Goals:Connect to Cognite Project via Python SDK: I need to use my client ID and client secret to establish a connection from Google Colab.Create Hierarchical Assets: My aim is to create a parent asset, named "Wind Farm," and within this parent asset, include two child assets, Asset A and Asset B.Upload Time-Series Data from CSV: I have CSV files containing wind-speed and wind-power data for Asset A and Asset B. I need to upload these as time-series d
I want to retrieve data frame based on external IDs for the past 24 hours. So, if current date = 08/15/2023, it should try to get the previous day’s datapoints for 24 hours i.e, from 08/14/2023 00:00:00 to 08/14/2023 23:59:59. Please share with the actual code on how to put the parameters. from cognite.client import CogniteClientclient = CogniteClient()df = client.time_series.data.retrieve_dataframe(... id=12345,... start=<What to fill here>,... end=<what to fill here>)
How do I log errors and activities while working with the Cognite SDK. I need to keep track of what the code is doing, diagnose issues, and improve the overall reliability of the application. If I am designing a function, how to handle all these logging in my code to better log errors and validations within the application. Please advise. Also share practical code samples from SDK
Hi I have a final computed dataframe that looks like this. sample set alone listed here (15 rows) There are 570 records. I need to create timeseries for sumprod and derivedYields columns as per the value in Yieldcode. I have written the code and it is running and timeseries is getting created. But it is running slow. How to make it get done faster?Any best method? Please advise sumprod Yieldcode Rank Group derivedYields MBBLD Vol LP-Class 1 532 0.009636 VBALFG1 1 VBAL 0.009636 3.524946 FG1 2 533 0 VBALLP1 2 VBAL 0 0 LP1 3 534 0.210269 VBALFN1 3 VBAL 0.218807 80.0382 FN1 4 535 0.037774 VBALLW1 4 VBAL 0 0 LW1 5 536 0.048263 VBALSK1 5 VBAL 0.094867 34.70158 SK1 6 537 0.017368 VBALHK1 6 VBAL 0 0 HK1 7 538 0.128149 VBALSR1 7 VBAL 0.142624 52.17094 SR1 8 539 0.014722 VBALDS1 8 VBAL 0 0 DS1 9 540 0.034342 VBALAG1 9 VBAL 0.0345
I want to create a cognite function that will do lot of computations and finally attach the derived output to a timeseries. Is there some production-ready sample code snippet that can be shared to see how to attach a derived value from cognite function to a timseries?
How to fetch all the timeseries linked to an asset? I have a root asset that has 16 child assets. Each of those child has 18 timeseries objects. How do I write a code so that I can loop through this setup and read each of those timeseries objects and read the datapoint for a particular day and gather them. root = client.assets.list(name='liquid_asset')children=client.assets.list(parent_ids=[root[0].id])for i in children: print(i.time_series)Result is this: <bound method Asset.time_series of <cognite.client.data_classes.assets.Asset object at 0x3468500>>I could not iterate through the i.timeseries and read the datapoint from a very specific timeseries object named as 'PVOL'. Please help.
Hello Cognite Community,I'm currently in the process of deepening my understanding of the Cognite Python SDK, and I've encountered some hurdles that I believe this community could help me overcome. I'm working with a time-series dataset and aiming to use it to make machine learning-based predictions. To facilitate a more comprehensive response, I've provided a snapshot of the data I'm working with and detailed my queries below.Dataset Structure: The data comprises 5 columns: time, ws_E05, ws_E06, wp_true_E05, wp_true_E06. The 'ws_E05' represents the true wind speed at location E05, and 'wp_true_E06' signifies the true wind power at location E06.Query 1: I plan to utilize this dataset to forecast the subsequent 10 minutes using Linear Regression in the Python SDK on Cognite. Could you advise me if the present state of this time-series data is sufficient to get started, or are there certain modifications or preprocessing steps I should consider? I'm also interested in visualizing this da
I have to do complex calculations and store the resulting data in the form of data frames (tabular form of data structure). The only way I see is to use the ‘sequences’ in CDF resource types. But I think CDF sequences doesn't allow to do data wrangling as we can do in pandas data frames. So, I wish to know if there is any best way to accomplish the storage of tabular data structures like data frames / arrays like what we can usually do in core Python. Basically, I wish to store data in structures like we typically have in core Python. Lists, Dataframes , arrays etc. Any structure available in CDF?
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.