Skip to content

Model Query Language (MQL)

Model Query Language is a meta-language native to the Tool. It was specifically designed to query, transform, and manipulate CIM-based data models. Most of the today’s data query language, such as SQL, OCL, SPARQL, and XPATH, are too complicated for end users. They are overkills for CIM based model transformation and manipulation. MQL targets an object-oriented data model, such as CIM. It uses a simple syntax, similar to algebraic expression, to describe commonly-used data operations. The MQL engine inside the Tool is capable of parsing the MQL expressions and performs the designated data operations.

To help users quickly understand MQL and lean how to use it, we divide this tutorial into two sessions. Each session is followed by a hand-on lab, designed to help users practice and strengthen what is learned. The first session focuses on learning the basics of MQL, including MQL syntax, constructs, and expressions. The session will be followed by Lab 1 that includes 6 simple model query examples. The second session introduces some advanced concepts of MQL, aimed at helping users construct some sophisticated model transformation views and validation rules. In Lab 2, we will learn how to use these advanced concepts to build custom reports for finding the information of interest from a test CIM model.

Key Features of MQL

  • Declarative: Users declare what need to be done rather than programming how to do it.
  • Expressive: Like an arithmetic expression, MQL is easy to construct.
  • Resourceful: MQL supports
  • bi-directional dataset-to-dataset, object-to-object navigation
  • filtering, grouping, sorting, union, etc.
  • function and operator, built-in or user-defined
  • alias designed to facilitate the reuse of declarations
  • formatting & reporting

Overview of Subtopics