Changelog

All notable changes to OQL will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Version 1.0.0

First version of OQL

Added

  • aggregate clause
    • Support for expressions that form a full arithmetic/logical AST
      • and and or
      • Comparison operators (=, !=, <, <=, >, >=, is [not], in, not in, contains)
      • Arithmetic operators (+, -, *, /)
    • Referencing fields in the target list
      • Anything in the target list of the aggregate clause may alias with as
      • References should typically use snake-case tokens with dot chaining but we also support quoted segments for nicely formatted field names
    • Ability to leverage macros
    • Oden’s default KPIs
      • aggregation.oee
      • aggregation.performance
      • aggregation.output
      • aggregation.availability
      • aggregation.utilization
      • aggregation.scrap
      • aggregation.yield
      • aggregation.quality
    • Aggregation functions for metrics and intervals
  • where clause
    • Filtering by time using where time from <start> to <end> and where time between <start> and <end>
    • Filtering by time using watermarks
    • now() to return the current time
    • date_trunc() to truncate datetimes
    • adjustTimeToInterval() for adjusting timestamps to interval boundaries
    • Filtering by factory ids and line ids
    • Filtering by factory names and line names
    • Filtering by product names
    • Filtering by line attributes
    • Filtering for interval metadata
    • Boolean algebra for combining filters using or and and
  • group by clause
    • Grouping by time buckets (s, m, h, D, W, M, Q, Y)
    • Grouping by factory ids and factory names
    • Grouping by line ids and line names
    • Grouping by product ids and product names
    • Grouping by interval properties and metadata
  • order by clause to order results by any field
  • having clause to constrain results
  • limit and offset to constrain results
  • apply clause for pipelining results into custom functions
  • settings clause
    • disable_cache for disabling the OQL cache
  • Support for common table expressions (CTEs) and joins
    • CTE bodies can be full subqueries or macro-like function invocations
  • Literal support covers signed integers, decimals, single/double/backtick strings, arrays, and UUID tokens (quoted)
  • Comments follow SQL-style -- to end of line, and whitespace is ignored broadly