Quarry: An open source tool for OPC UA SPARQL queries over hybrid architectures using query rewriting
Magnus Bakken · 2021
OPC UA is an open set of specifications for communication and modelling that have found extensive use in industrial automation. OPC UA information models are part of the specification and are used by asset owners and equipment vendors to describe the static parameters and time varying signals belonging to equipment in standardized ways. Such descriptions are aimed to drastically reduce the cost of integrating software managing these industrial assets. Hindering the adoption of OPC UA information models is their inherent complexity and the problematic specification of query support. Previous research has implemented the OPC UA query specification using SPARQL and found that formulating queries in SPARQL natively provides shorter queries that are easier to formulate. However, parts of the OPC UA graph are time-varying, and may index large time series data sets, which are sub-optimally handled by most available SPARQL databases. We show how OPC UA can be mapped to the Semantic Web in a way that allows a hybrid approach where time series data is stored in a specialized system and describe a query rewriting approach that allows for joint queries over static OPC UA information models and time series data. Compared to existing approaches, we argue that our approach is better suited for analytics applications that require portability across infrastructure and allows a greater range of SPARQL engines. A prototype implementation called Quarry is open sourced under the Apache 2.0 license to improve the accessibility and reproducibility of this research area.