Join the conversations to shape a safer, more efficient, and sustainable industrial future!
Recently active
Have been having issues with Cognite Charts since it’s been merged into CDF. Whenever I try to go to charts, I have to clear the cache in my browser for it to work, otherwise it doesn’t load. This is a small nuisance that can prevent people from adopting the use of Charts as their daily tool.
When I run the following code in Jupyter notebook in CDF, I dont get any problem and it runs fineimport pandas as pdroot_asset = 'LPM_YT_MODEL'def handle(client, data=None, secrets=None, function_call_info=None): start=pd.Timestamp(data["start_date"]) end=pd.Timestamp(data["end_date"]) ts_names_list = client.time_series.list(limit=None,asset_subtree_ids=[client.assets.list(name=root_asset)[0].id]) time_series_data_extids = ts_names_list.as_external_ids() data_points = {ts: client.time_series.data.retrieve_dataframe(external_id=ts,start=start,end=end,) for ts in time_series_data_extids if not client.time_series.data.retrieve_dataframe(external_id=ts,start=start,end=end,).empty} but when this is executed as cognite function, it is throwing following error Traceback (most recent call last):File "/home/site/wwwroot/function/_cognite_function_entry_point.py", line 455, in run_handleresult = handle(*function_argument_values)File "/home/site/wwwroot/function/handler.py", line
I am trying to take cognite training and while playing the video i get the error:-”The video file cannot be played.(error code 232011)”
There is a requirement for me where the stakeholder wanted to download all the charts (120+) in one-GO for a specific date range and then validate them. There are some charts (out of 120+) that are using the timeseries objects with some calculations. (ta * tb) /1000 , (ta + tb + tc)/1000 , 141/(ta) - 131.5,…… I cannot go to each one of them manually and download them, but the customer wants to download them all in one and then validate as per their choice. Please advise
I have some issues, like end of electric power during the course, mainly on the final test, because at my house have 4 blackouts at afternoon. So I need to make the final test to get the Certificate.
Below is the screenshot of error , during running transformation. Below is the Query used to transform, Preview is working fine. But During the Transformation Run, it is giving above error, saying start time values cannot be greater than endTime values. But According to Query it shouldn’t be the case. plz suggest solution. Attached Sample Data(data sheet) For your reference.select `Notification_no` as externalId, `startTime` as startTime, `endTime` as endTime, `description` as description, `type` as type, 1118188859138991 AS dataSetIdfrom(select concat('NO_',QMNUM) as `Notification_no`, --to_timestamp(QMDAT,'M/d/yyyy') as `startTime`, CASE WHEN RIGHT(MZEIT, 2)='AM' THEN TO_TIMESTAMP(CONCAT(QMDAT,' ', SUBSTRING(MZEIT, 1, LENGTH(MZEIT) - 3)), 'M/d/yyyy h:mm:ss') ELSE TO_TIMESTAMP(CONCAT(QMDAT,' ', SUBSTRING(MZEIT, 1, LENGTH(MZEIT) - 3)), 'M/d/yyyy h:mm:ss') + INTERVAL 12 HOURS END AS `startTime`, CASE WHEN isnull(QMDAB) THEN
I have a set of timeseries objects in CDF. I want to create a chart using SDK based on some function using the base timeseries objects. How Do I do that using SDK I have a timeseries object with externalID ‘ts-ext1’. I need to create a chart that follows the operation as below.[141/(ts-ext1) - 131.5 ] How do I do this in code iteslf?
In this post, I want to mention a tool that can help us troubleshoot issues such as authentication or unexpected errors: FiddlerFiddler is a Windows-only tool that logs HTTP(s) traffic. This will help you to understand what you are sending on the payload in the request and what response you are getting. This is a community-trusted free tool.Some applications don't show descriptive error logs in the UI, which makes it challenging to narrow down the issue; however, you can get a better understanding of what is going on if you have visibility on the API calls.When using a Web app in the browser, you can use tools such as the Network Tab in the Developer tools to capture the traffic and inspect the API calls. You can get more details on how to do this in this post:But what do you do when you get errors in applications (.exe) such as Power BI, for example? For scenarios like this, you can use Fiddler.How to use FiddlerDownload and install Fiddler-Classic Open Fiddler You need to decrypt tr
Hi!I was trying out this API: https://pr-ark-codegen-1646.specs.preview.cogniteapp.com/v1.json.html#tag/Instances-(New)/operation/byExternalIdsInstances.When i try to Retrieve a node by external id by giving source details as well, it works fine for a single View-ID pair. But when i try to do for more than one, I’m getting empty response.Example: Say Id1 belongs to View1, and Id2 belongs to View2.Querying with (Sources : View1, items : id1) as well as (Sources : View2, items : id2) gives correct response as expected. But when I try (Sources : [View1,View2], items : [id1,id2]), i get empty response. I was hoping it would provide information on both Id1 and Id2
In the extractor I wanted to ingest the datapoints for the created timeseries in the given dataset.even though its ingesting datapoints for the created timeseries But also ingesting datapoints for timeseries which are not available or not created. It's also creating timeseries and ingesting datapoints.OR is there any way to add config or mapping for extractor??
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>)
Facing a Critical Error while running the below sql code.SQL Error:(Attached the Raw input Excel for your reference.)Text '9/28/2022' could not be parsed at index 0 | code: 400 | X-Request-ID: 14d6d486-1958-99a3-b552-d19e5937bf82 -- Loads SAP Work Order as events. Data is already contextualized with assets using functional location. An inner join with CDF Assets is used to ensure only work orders for assets already loaded is ingested.select concat('WO_', `Order Number`) as externalId, to_timestamp('Basic Start Date','M/dd/yyyy') as startTime, to_timestamp(`Basic Finish Date`,'M/dd/yyyy') as endTime, 'Work Order' as type, array(`Asset ID`) as assetIds, 'SAP PM' as source, `Description` as description, `Order Type` as subtype, 2395436788557957 as dataSetId, map_concat( to_metadata_except(Array( -- "Order Number", "Basic Start Time", "Basic Start Date", "Basic Finish Date", "Asset ID", "Description", "Order Type"), *) -- map("Priority",
Hello, I am trying to use “Filter time series” or “List time series” endpoints. However, because of 1000 limit, I need to parallelize these calls as I would like to retrieve thousands of timeseries. The challenge I am facing is the pagination used in these endpoints which is based on id of timeseries. Is there a way to use index as pagination?
Hi,To apply a startWith filter on a property, we can do:prop_view = client.data_modeling.views.retrieve(('myspace', 'myview'))filters.Prefix(prop_view[0].as_id().as_property_ref("myPropertyName"),"xxx")This is working fine. However, as the externalId is not a property so the code below doesn’t work:filters.Prefix(prop_view[0].as_id().as_property_ref("externalId"),"xxx")and the error message is: “Invalid prefix filter with property reference [myspace, myview/94b12855a09cf4, externalId]. View myspace:myview/94b12855a09cf4 does not have property externalId.” Could you help find out how to apply a startWith filter on externalId in python sdk? Regards,Xiaofeng
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
I have implemented block-updates to work with CDF Files. This by itself works quite well, as documented here.However, for very large files there are some problems. After some time, typically around 4 minutes, one of the block updates fail, with a simple `ReadError`. There’s no response from the API.Some logs from our application:DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=bDEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2660989807DEBUG:odp.odcat.storage.cdffs.async_spec:Data: len=5376000, MD5=6a0c0db1b66dac18ee28e8b082830667DEBUG:odp.odcat.storage.cdffs.async_spec:Buffer cursors: start=0, end=5242880, final=FalseDEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=RED
We have some requirements to use DB in built extractors and how can we setup Extraction pipeline configuration.
I am looking for a way to update the extraction.id-prefix field inside the OPC-UA extractor config file after partially starting data extraction. Basically, I need to be able to store data in CDF raw with External ID prefix set to a particular tag value coming from the OPC server. So I would need to read the timeseries value of that particular tag from the OPC server and set this value as id-prefix in the extractor config file before pushing subsequent data to CDF raw.Since the pre-built OPC-UA extractor works well for our use case, I am looking for ways to use it as is without having to implement a custom extractor. What would be the best way to implement the functionality mentioned above using the OPC-UA extractor?(Attn. @Jatin Sablok )
Hi. I’m using the Cognite Data Source for Grafana. For numerical time series I can retrieve properties like {{name}}, {{description}}, etc. But for some reason I cannot for string time series. The only difference between the two panels below is the External Id of the time series it points to: one is a string time series, the other numerical. Both time series have a name specified in CDF.
I have some views with simple array properties (arrays of primitives) and others with arrays of relationships to views (edges).Location viewI can filter the simple arrays with the “containsAll” or “containsAny” methods.But there seems to not be a filter avaiable for the edges in the Graphql API. How can I filter by these properties via the GraphQL API?
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 have been working on this for some time now. It was all running fine till now but suddenly it is failing now, and it is giving an error for this function. Is there something that has been changed in the platform/library?DB name and table name are all accurate and was running fine till today. lp_df_input = client.raw.rows.retrieve_dataframe(db_name="Eashwar_MOTDB-db",table_name="lp_input",limit=None,columns=None)Error: ---------------------------------------------------------------------------MissingSchema Traceback (most recent call last)Cell In[30], line 1----> 1 lp_df_input = 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:613, in RawRowsAPI.retrieve_dataframe(self, db_name, table_name, min_last_updated_time, max_last_updated_time, columns, limit) 589 """`Retrieve rows in a table as a pandas dataframe. <https://developer.cog
Hi,I need to connect to CDF with Power BI and when trying to load the table, I get this error:It only loads a limited rows of data (probably those rows have no errors) and I cannot change the format of the fields in PBI.I already whent thru the documentation , but the solution provided there does not work in this case (there is no option to change the data format).For other datasets (other data sources), where Power BI encounters errors, the data is still loaded (with errors), but in this case, the data is not loaded and the import is stopped by the error. This is also keeping for saving the report or using the data source.The behavior needed is that PowerBI is loading the entire dataset with errors and to change the field format before importing the data.Thank you!
https://docs.cognite.com/cdf/integration/guides/contextualization/interactive_diagrams How to create engineering diagram, and How get label name in diagram “23-LAHH-96138” through JavaScript.
I’m facing the above issue while running the demo cognite custom extractor