Join the conversations to shape a safer, more efficient, and sustainable industrial future!
Recently active
so in the Learn to Use the Cognite Python SDK in the data engineer course , I got stuck on the hands on test.as in the readme file after I created a dataset and a root assets I just do not know how can I do this section : - Read the `all_countries.csv` file as a dataframe and list all the unique regions in the world.- For each geographical region, create a corresponding CDF asset that is under the "global" root asset and is associated with the "world_info" data set.- Next, create country-level assets using the data from the CSV and link them to their corresponding region-level assets.
I have a data model with a many to many relation between view 1 and view 2. This is modeled as an edge and stored as columnEdgeView2 in view 1 and has an edge pointing the other direction in the other view. I have been digging through the Python SDK documentation but cannot figure out how to retrieve this information. Can anyone help me with this? What I need to do is query either of the edge properties and do something similar to the instance.list of regular views. If possible, getting the columnEdgeView2 included in the result when listing instances the normal way would also work. I have tried to replicate my data model structure below.type View1 { column1: String columnEdgeView2: [View2]}type View2 { column1: String columnEdgeView1: [View1] @relation( type: { space: "space", externalId: "View1.columnEdgeView2" } direction: INWARDS )}Thank you!
Hello Team,I am trying to check like how many edges(entities in my case) are null in the view(event) is there any specific way to do so? I am trying right now sdk query api like below, but not working. Please give your insights. { "with": { "Event": { "nodes": { "filter": { "hasData": [ { "type": "view", "space": "slb-pdm-dm-governed", "externalId": "Event", "version": "1_7" } ] }, "chain_to": "destination", "direction": "outwards" }, "limit": 10000 }, "Event_2_entities.Entity": { "edges": { "from": "Event", "direction": "outwards", "filter": { "and": [ { "equ
Hello, we're using pygen to generate a Full Data Model and instances. One of our containers can have multiple connections to objects in another container (see the pic below).As a result, definitions are lists of objects. It is then difficult to query data using tuples: bays = dm_client.bay.list( bay_to_line=(space, id), retrieve_connections="identifier", limit=None, ).to_pandas()We can overcome this by reading all bays with retreive_connections=”full” and then querying the data. But we would like to generate a model, where such tricks are not needed and the definitions are not a list. Is it possible? To generate a model we do this workflow: neat.read.rdf("lines_bays.jsonld")neat.infer(max_number_of_instance=-1)neat.prepare.data_model.cdf_compliant_external_ids()neat.verify()neat.convert("dms")neat.set.data_model_id(("lin", "lines", "v1"))neat.to.cdf.data_model()neat.to.cdf.instances()
I'm using python sdk and wanted to query instances based on a condition using “data_modeling.instances.query” methos . I have a view called TimeseriesPropertyType which has a field (properties: [Property]) which is a reverse direct relation throughProperty: "propertyType".i just need to check if there are any “properties” field values associated with each instance of the TimeseriesPropertyType view. for that I'm fetching data in property view associated with those particular TimeseriesPropertyType view and doing the check manually in code.. is there any direct filter i can use that's available? i dont see any filters available on properties field in query explorer for the samebelow is the query im using #view_id_ts_prop_type - TimeseriesPropertyType view#view_id_property - Property viewquery= Query(with_= { "TimeseriesPropertyType":NodeResultSetExpression( limit=10000, filter= HasData(views=[view_id_ts_prop_type])), "Pr
Hello, We are currently the Pygen (cognite-pygen==1.0.2) to generate an SDK of our data model. While testing a use case where we want to query all Casings of all Onshore Wells we notice that we get different results using the `List` and `Select` methods. # First method of queryingwells = dm_client.well.list(product_line='Onshore', retrieve_connections='identifier',limit=-1)direct_relations = []for w in wells: if w.wellbores: for wb in w.wellbores: wb_ext=wb.external_id inst = dm.DirectRelationReference(wb.space, wb_ext) direct_relations.append(inst)wb_sections = dm_client.wellbore_section.list(wellbore=direct_relations, retrieve_connections='full', limit=-1)casings = wb_sections.casingprint(f'casings: {len(casings)}') # casings: 645# Second method of queryingcasings= dm_client.well.select().product_line.equals('Onshore').wellbores.wellbore_sections.casing.list_casing(limit=-1)print(f'casings: {len(casings)}') # casings: 94Any thing we missing
Hello Team,We have three views:→ ScalarProperty{#other fieldsentity: Entity}→ Entity{#other fieldsentitytype: EntityType}→ EntityType{externalId}Given this, from ScalarProperty view, can we use groupby on entity.entityType.externalId when querying instances and counting them using the query API, or is there another way to achieve this?
Is anyone using Cognite as their main timeseries historian? We are always exploring alternatives and would be interested to hear if Cognite has fit this use case for any users.
The current naming convention in the OPCUA server node structure naming is not intuitive for user to be able to find the tag in Cognite.From the example below, we will have 3 timeseries tags with Message and also Data.It is not intuitive for user to look into the path or externalid to find which it is belongs to.How do we configure the OPCUA extractor to construct the timeseries name based on certain criteria or to based on the complete path of the node to be the timeseries name (e.g. Root\Temperature1\Message as the name)?E.g. OPCUA Node structureRoot|_ Temperature1 |_ Message |_ Data|_ Temperature2 |_ Message |_ Data|_ Pressure1 |_ Message |_ Data
Hi All,I am working with hosted extractors for kafka and it works pretty well for me with transformations when we have plain json data in kafka topics.Now I am trying to check if we can work with zlib gzip compressed data coming in topic, I have json string and messagepayload attribute of json string will be holding compressed data instead of whole message as compressed one, is it possible to write transformation for such data. e.g., in kafka topics{ "Header": { "MessageId": 133367162, "MessageType": "DATA_REPORT", "Timestamp": 1741122422, "PayloadCompression": "Z_LIB_COMPRESSION" }, "MessagePayload": "eJyqVnJJLctMTi1WsoquVvJLzE1VslIyVNJRckksSQxJTIeIhySmQ6WCA3wVfFMTi0uLUlNgqioLQDIu/qFOPq7xYY4+oa5KOkphiTmlMLNCMnNTi0sScwuUrAzNTQwNjYxMjAwtzA11lAJLE3MySyqVrAxqY2tjawEBAAD//x5aKt0="}
As owner of a canvas, the Canvas UI identifies me as expected such as in version history or in comments. When another user makes edits and comments they are not identified and show up as seen in the attached screenshot. Just in case it matters, this is a Rockwell Automation DataMosaix project. Thanks!
After creating a new calculated time series in Charts, how can I replicate the same calculation across multiple similar assets?Let’s say I calculate [ampers / Fluid rate] in one pump; I’m now interesetd on repeating the same calculation across 10 other pumps (let’s assume timeseries have the same name for all pumps, i.e.: PumpX:AMP).Am I obliged to go to SDK and code that? Shouldn’t be an easier way to do that? Thanks!
Hi,I have a datamodel in CDF and I want to run a GraphQL query through the SDK to retrieve specific data from the model. When I try to run response = client.data_modeling.graphql.query( id = ('sp_watercourse_data_model', 'Watercourse', 'v1'), query = query )I receive the following error message:CogniteGraphQLError: [GraphQLErrorSpec(message=Could not find data model with space=sp_watercourse_data_model, externalId=Watercourse and version=v1, locations=[], extensions={'classification': 'DataFetchingException'})]However, when I list my models usingmodels = client.data_modeling.data_models.list(limit=100).to_pandas()the model is in the dataframe as expected. What causes this problem and how can I fix it? thanks
I had gotten a number of rest extractor pipe lines running the other day and then paused them. I am now trying to resume them and I am getting an Startup Error message “Missing required field session key”. I do not see a field session key referenced anywhere in the documentation on the rest extractor. Are you able to give any additional inform of where I can find this field?
I have created a function that was configured to 5G of memory and 2 CPUs to run huggingface AI model (py311). Deploying the function went fine. However, when running the function it throws this error. RuntimeError: [enforce fail at alloc_cpu.cpp:118] err == 0. DefaultCPUAllocator: can't allocate memory: you tried to allocate 9437184 bytes. Error code 12 (Cannot allocate memory)
Are there any documented use cases or papers on integrating MLflow with Cognite, or is it something we need to implement ourselves?For example, if we aim to seamlessly integrate the MLflow UI with Cognite to evaluate and select the top-performing models, we could leverage SQLite, which operates on the local file system (e.g., mlruns.db) and provides a built-in client, sqlite3. However, our preference is to seamlessly integrate it with Cognite.
Within our implementation we have an existing Hosted Extractor reading data from an IoT Hub that contains multiple sites worth of data. Our Hosted Extractor Mapping Template filters for events that have a particular deviceId on it, representative of the location these events are coming from. In effort of ingesting another site-location datafeed, I wanted to extend the template with an ELSE IF condition that has the mapping rules for the other location, which are almost identical to the first except for the target datasets, which I’ve come to realize is set in the Sink section of the Extractor Configuration. The net result here is needing to create redundant Hosted Extractor configurations that change only a filter, rather than having a cascading ELSE IF ruleset that applies to the full stream. For example, this pseudo-template for our existing hosted extractor configuration for one site: if (context.messageAnnotations.`iothub-connection-device-id` == "SITE_A") { input.map(record_u
Hi,I’ve encountered a bit of issue with CDF when using Microsoft Edge. The full screen button doesn’t do anything. In Chrome and Firefox it does as expected and opens the document in full screen mode.Regards,Markus
Hi, i have set notification to alert when runs failed. However, i noticed that am still receiving email notifications wherever the extraction pipeline is successfully executed. Could you please advice. thanks
charts Daily average of the previous dayIf anyone knows a good way to do this, please let me know.I would like to see the previous day's 24-hour values by averaging the data over the day with a mean of 0 days 24:00:00 (resampling to granularity), but due to the UTC+9:00 specification, the previous day's processing does not occur until 9:00 AM in japan.I would like to see the previous day's nightly processing volume average at 8:00 AM.The only way I can think of is to use the “shift time series” to force it forward, i would be appriciated if anyone have a better idea..
Hi Experts, Need your help on Cognite Python sdk.My goalGet all linked timeseries of an AssetI am using Asset class object https://cognite-sdk-python.readthedocs-hosted.com/en/latest/assets.html#cognite.client.data_classes.assets.Asset time_series function ProblemIt is only giving me the ‘Directly linked timeseries’ , not all the ‘Linked timeseries. Means in this case I only getting 13 timeseries objects , compared to 64 linked timeseries of the Asset. Appreciate your help on adopting the correct approach Thanks and RegardsSree
I would like to know the benefitS of implementing UNS architecture in CDF. A detailed guide would be excellent to show how to implement it in the oil and gas refinery with all the prerequisites and third-party platforms along with that.
Hii Team,I'm looking solution for below problem.Currently we have build our custom model using core data model. we have timeseries available in cdf.timeseries resource. Now i want to provide timeseries reference in below view using transformation. Can anyone suggest how timeseries concept is worked in core data model using transformation. type TimeseriesProperty implements Property & CogniteTimeSeries & CogniteDescribable & CogniteSourceable @view(version: "2_1") { name: String source: CogniteSourceSystem entity: Entity sourceId: String sourceContext: String sourceCreatedTime: Timestamp sourceUpdatedTime: Timestamp sourceCreatedUser: String sourceUpdatedUser: String isStep: Boolean! type: CogniteTimeSeries_type sourceUnit: String unit: CogniteUnit assets: [CogniteAsset] equipment: [CogniteEquipment] activities: [CogniteActivity] acquisitionPeriodTimeZone: String isAggregated: Boolean! isAggregatedAtSource: Boolean aggregationMethod: String isString: Bo
I have set up the Cognite Pi Extractor on a virtual machine and am running into errors in the log: Fatal error in request of type "CreateTimeSeries": Unauthorized. Unauthorized RequestId: , CDF Message: UnauthorizedI have checked that the client_id and client_secret being used in the config.yml have the ‘time_series: write’ capability for this project. Additionally, I have confirmed that the client_id and client_secret can be used with the python sdk to create timeseries in the project I am working with.Any ideas where I am going wrong?
type FTAC_ActivityLog { Site: String AddDate: Date ActionComments: String VersionNumber: Int64 UserComments: String Label: String AssetId: String ActivityDate: Date Action: Int64 ActivityLogId: String SortOrderId: Int64 User: String VersionId: String AssetPathId: String}I have a mode as aboveI want to do the aggregation function for the user per site statistic. how do I prepare my aggregation query, I am new bee for this, by looking for the https://docs.cognite.com/cdf/dm/dm_graphql/dm_graphql_querying aggregation section, quite confuse.