You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current AAS Query Language does not support variable binding or arithmetic expressions. This makes common comparison scenarios—such as evaluating the difference between two assets—difficult to express in a single query.
For example, to compare the weight of an AAS with manufacturer "X" to another with manufacturer "Y", users must:
Execute two separate queries to fetch each AAS individually.
Perform the comparison logic on the client side.
This breaks query cohesion, increases complexity, and limits server-side optimization.
How should it be fixed?
Introduce variable bindings to allow assignment of query results to identifiers. And allow arithmetic operations. For example:
# Selecting AAS from manufacturer X
$match(
$sm#idShort $eq "TechnicalData",
$sme#semanticId $eq "0173-1#02-BAF016#006",
$sme#value $lt 100,
$sme#bind :x
)
...
# Selecting AAS from manufacturer Y
$match(
$sm#idShort $eq "TechnicalData",
$sme#semanticId $eq "0173-1#02-BAF016#006",
$sme#value $lt 500,
$sme#bind :y
)
...
# referencing to the selected attributes and perform cross-comparisions
:val(:x) - :val(:y) > 100
ps: I know, it is complex, but maybe worth the discussion.
I have signed the required Developer Certificate of Origin (DCO) already.
The text was updated successfully, but these errors were encountered:
Hi @mhrimaz, we explicitly decided to not introduce such features (yet) to ensure a somehow "simple" query approach. No need to say that the current version is already complex enough...
Still, the requirement was to not go the way to fully-fledged query languages (Cypher, SPARQL, GQL etc.). For use cases where this is needed, I'd propose to expose the AAS repo content via query endpoints that fulfil one of these existing standards.
Even if that means that a generic, AAS query language enabled client might not be able to consume this endpoint out of the box.
What is missing?
The current AAS Query Language does not support variable binding or arithmetic expressions. This makes common comparison scenarios—such as evaluating the difference between two assets—difficult to express in a single query.
For example, to compare the weight of an AAS with manufacturer
"X"
to another with manufacturer"Y"
, users must:This breaks query cohesion, increases complexity, and limits server-side optimization.
How should it be fixed?
Introduce variable bindings to allow assignment of query results to identifiers. And allow arithmetic operations. For example:
ps: I know, it is complex, but maybe worth the discussion.
The text was updated successfully, but these errors were encountered: