Skip to main content
Closed

Enhancing FDM Aggregation capabilities

Related products:API and SDKs
  • August 14, 2024
  • 4 replies
  • 150 views

On behalf of Celanese.

There are some limitations on the aggregation API that we would like to enhance.

  • It is not possible to aggregate edges

Given the following object types in a random data model, where one reporting site is connected to many reporting units. One Reporting Unit can be connected to Many Reporting Sites.

Today it is not possible to aggregate how many reporting sites are associated with a specific reporting unit, and that is a common use case.

 

type ReportingSite {

  name: String!

  description: String

  reportingUnits: [ReportingUnit]

}

type ReportingUnit  {

  name: String

  description: String

}

 

https://api-docs.cognite.com/20230101/tag/Instances/operation/aggregateInstances

The endpoint for aggregation only accepts a specific view to aggregate, not an edge connection.

 

  • The aggregation API of Cognite has several limitations; we cannot group by date. More complex filters do not work either. Aggregations are limited to primitive fields in the GraphQL API.

 

  • Using the GraphQL API, we cannot filter an object type based on its edge. For example, querying the reporting sites associated with a specific reporting unit is not possible.

Andre Alves
MVP
Forum|alt.badge.img+13

@Lucas Rosa Alves  similar topic
 

 


Elka Sierra
MVP
Forum|alt.badge.img

Hi @Lucas Rosa Alves, thanks for your inputs. 

Please see my answers in the related topics. We will be using them to track the individual challenges you post as part of this ticket. 

https://hub.cognite.com/ideas/cognite-fdm-3-on-behalf-of-celanese-3833
Jay Vansickle

Thanks and regards

Elka


Elka Sierra
MVP
Forum|alt.badge.img

Hi @Lucas Rosa Alves

Providing here a relevant answer, please let me know if this solve your challenge. The related ticket was set to done. If you can confirm this is the case here, then I will close this ticket too. 

 

While it is not possible to aggregate across edges or by filtering on edge properties, it is possible to aggregate and filter on direct relations. This may be a feasible option for your use cases - add a direct relation property in the reporting unit's type to the reporting site type, and group on or aggregate on that property. Diving into the details here would require having a proper look at your data model definition.


Direct relations are a form of lightweight edge - they cannot have types or properties, but are inexpensive to store and scan and hence computationally feasible to consider during aggregation operations.

Thanks and regards

Elka


Elka Sierra
MVP
Forum|alt.badge.img

Hi Lucas, 

Thank you for sharing your idea and contributing to our product development process.
After careful consideration, we’ve decided not to move forward with this suggestion at this time.
Status: Won’t Do
Reason: The request is covered by another existing functionality.
Thank you again for your contribution and for helping us improve. If you have other ideas or feedback, we’d be happy to hear them!

Best regards,
Elka
 



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