Our own ASAM ODS query language: versatile and easy to learn
At HighQSoft, one of our main tasks is to provide our customers with client software for attending to their unique business requirements.
Therefore, over the years, we developed our libraries and frameworks for making it easier to write and read data from an ASAM ODS server. We created the HighQSoft Query Language to hide the underlying networking protocol and making it easier to convert business-oriented operations into ASAM ODS calls.
HQL is an ASAM ODS client that is available as a JAVA library, web service, Matlab ODS Toolbox, and command-line tool. Combined with its compatibility with ASAM ODS 5, ASAM ODS 6, and ATFx, it is a versatile tool indeed. Today, we successfully integrated HQL in our in-house software development and shared it with our development partners. Also, our customers develop client applications on their own.
The ASAM ODS specifications adopt vendor-neutral technologies to allow client applications to connect to an ASAM ODS server: RPC, CORBA, and HTTP + Protobuf. To create an ASAM ODS client application, it is necessary to understand the networking technology (CORBA for ODS version 5, HTTP + Protobuf for ODS version 6) and the ASAM ODS API specification.
When the ASAM ODS committee conceived the OO API, CORBA was the de facto solution for connecting distributed systems. CORBA supported multiple programming languages and architectures, with an object-oriented design. The emergence of SOAP and REST-based web services may have made the CORBA standard losing much of its popularity. For the ASAM ODS standard sending mass data in a text format (XML or JSON) over HTTP was not an option. CORBA continued to be the solution for programmatic access to an ASAM ODS server. After the Protocol Buffers standard became stable and widely used, the industry used it as the basis for the HTTP client API with version 6. Nevertheless, ODS 5 servers are the most mature and widely adopted products at the time of writing.
The ASAM ODS object-oriented API can be quite complex, especially for expressing complex queries. Good software engineering practices hide this verbosity and translate requests from the business level into specific CORBA calls. Thus, collecting the experience working on different projects based on ASAM ODS, HighQSoft created a common framework supporting the task of programming with the CORBA API.
When upgrading from an ODS 5 to an ODS 6 server, development teams cannot reuse the client applications. ODS 6 requires a different networking protocol. With further software engineering efforts, it is possible to hide the CORBA API with technology-neutral interfaces (Java interfaces or C++ virtual classes, for instance) and data classes. By creating HTTP-based implementation of these interfaces, it is possible to make such a transition without creating new client applications from scratch.
HQL is used as a Java application programming interface for accessing ASAM ODS servers. At HighQSoft, this helped to reduce the development time of our products. The Manatee Web Application, and all of its customer-specific solutions, for instance, adopt HQL as a library instead of directly using the ASAM ODS OO-API. Also, HQL has been successfully used also by some of our customers that fully develop applications on their own. One of the most common feedback about HQL is how it can reduce the overall number of lines of code.
HQL is also a standalone program that can connect to any ODS server. It allows the user to input queries in an interactive command-line mode and see the outputs in a tabular textual format. It also enables the user to update instances, mass data, upload and download files, and change the application model structure. It allows users to quickly explore the test metadata and bulk data with just a few commands. Its similarity to SQL makes the language easy to use and memorize. It can be used also as a prototyping tool that facilitates your queries during development time.
One of the biggest drawbacks of using CORBA as a middleware for applications is that it may not be available for some programming languages (especially the most recent ones). In case there is no working CORBA implementation for your favorite language, HQL can be started as a web service and provide programmatic access via a REST endpoint.
The HQL web-service can be used as a central gateway to one or multiple Test Data Management systems.
As a Java library, HQL can operate in two modes: As a parser queries and statements are given as text using the HQL syntax. In this mode, HQL is a SQL-like language for querying ODS servers. As a query builder queries and statements are expressed as a composition of Java objects (something similar to JPA Criteria). In this mode, developers can create more dynamic queries. Also, there is a performance gain for avoiding string parsing. It also can be a way of sanitizing queries and make them safer.
Matlab and Python are scripting languages used by engineers, data analysts, and mathematicians. Both can utilize HQL directly. HQL converts results automatically into native data types (e.g. vectors and matrices in Matlab, series, and data frames in Python/Pandas). Developers can work in a faster way and without creating programs that export data in the desired format. The Matlab extension for HQL is already available and adopted by some HighQSoft customers. We plan to have the Python extension being available in late 2021.
Want to know more or have a demo of our powerful query language? Don’t hesitate to contact us!
The ASAM ODS interfaces define interfaces and methods to create, select, update, insert and delete instances of the ASAM ODS model. Additionally, it is possible to retrieve information about the model and the server-side features and configuration. As the ASAM ODS model is not fixed, the interfaces are generic. This results in complex calling sequences to communicate with the ASAM ODS server.
HQL is a SQL-like query language that encapsulates this complexity into simple strings.
The following example shows the JAVA code without catching exceptions and null objects.
AoSession aoSession = ...
// Get the model structure.
ApplicationStructure as = aoSession.getApplicationStructure();
ApplElemAccess aea = aoSession.getApplElemAccess();
// Get the application element.
ApplicationElement ae = as.getElementsByBaseType("aounit");
T_LONGLONG aeId = ae.getId();
// Get the name attribute.
ApplicationAttribute attr = ae.getAttributeByBaseName("name");
String aeName = attr.getName();
// Create the query structure.
QueryStructureExt qse = new QueryStructureExt();
// Request the name of the unit. qse.anuSeq = new SelAIDNameUnitId;
AIDName aidName = new AIDName(aeId, aeName);
qse.anuSeq = new SelAIDNameUnitId(aidName,
new T_LONGLONG(), AggrFunc.NONE);
// Initialize the other members of the structure.
qse.condSeq = new SelItem;
qse.groupBy = new AIDName;
qse.joinSeq = new JoinDef;
qse.orderBy = new SelOrder;
// Get the result.
ResultSetExt res = aea.getInstancesExt(qse, 0);
// Get the names.
String names = res.firstElems.values.value.u.stringVal();
As a starting example, have a look at the JAVA code to get a list of names of all available physical units:
HQL is a SQL-like query language and thus easy to understand for developers and engineers that are new to Test Data Management systems. The semantics are clear, easy and reduce training and development time significantly.
The HQL syntax covers all aspects of the ASAM ODS API while also providing additional functionalities for enhanced comfort. Thus, we assist in understanding the data by hiding the generic complexity. For advanced developers or generic applications,
HQL works with all domains and all commonly known ASAM ODS Servers. Also, it supports ASAM ODS 5.3.1, ASAM ODS 6.1 as well as ATFx files by configuration. This makes HQL a great tool for step-by-step migrations to ASAM ODS 6.1.
The ASAM ODS API is a generic and business case free implementation that allows its utilization by multiple domains and their tools. The HQL syntax is providing a more abstract interface, which accepts both base model and application model entities. With HQL, we transform your business language in the correct ASAM ODS queries.
HQL is versatile and flexible - it allows smooth integration of the Test Data Management system with your environment. With scripts, or fulfilling third party interfaces, your SAP system knows your test operation hours. We pull test equipment data into the Test Data Management system, or your scripts automatically provide information to any tool or system of your preference.