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
aggregateclause- Support for expressions that form a full arithmetic/logical AST
andandor- Comparison operators (
=,!=,<,<=,>,>=,is [not],in,not in,contains) - Arithmetic operators (
+,-,*,/)
- Referencing fields in the target list
- Anything in the target list of the
aggregateclause may alias withas - References should typically use snake-case tokens with dot chaining but we also support quoted segments for nicely formatted field names
- Anything in the target list of the
- Ability to leverage macros
- Oden’s default KPIs
aggregation.oeeaggregation.performanceaggregation.outputaggregation.availabilityaggregation.utilizationaggregation.scrapaggregation.yieldaggregation.quality
- Aggregation functions for metrics and intervals
- Support for expressions that form a full arithmetic/logical AST
whereclause- Filtering by time using
where time from <start> to <end>andwhere time between <start> and <end> - Filtering by time using watermarks
now()to return the current timedate_trunc()to truncate datetimesadjustTimeToInterval()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
orandand
- Filtering by time using
group byclause- 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 byclause to order results by any fieldhavingclause to constrain resultslimitandoffsetto constrain resultsapplyclause for pipelining results into custom functionssettingsclausedisable_cachefor 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