OBSL Core 0.2

OrionBelt Semantic Layer Vocabulary

OBSL is an RDF-based exchange format for semantic-layer models. It represents data objects, columns, joins, dimensions, measures and metrics, and since Core 0.2 the model's business rules and its links into external ontologies (SKOS mapping relations with provenance), in a graph form suitable for interoperability, governance and knowledge exchange. Every model loaded into the OrionBelt Semantic Layer is exported in this vocabulary and answers read-only SPARQL.

Namespace

@prefix obsl: <https://ralforion.com/ns/obsl#> .

Downloads

FileDescription
obsl.ttlOWL ontology (Turtle), Core 0.2
obsl.shacl.ttlSHACL validation shapes
example-sales.ttlExample: Sales model, including an external concept mapping

Classes

ClassDescription
obsl:SemanticModelTop-level container representing a complete semantic-layer model.
obsl:DataObjectA physical data source (table or view) referenced by the semantic model.
obsl:ColumnA column within a data object.
obsl:JoinA join path between two data objects, defined by source/target columns and cardinality.
obsl:NestedSourceWhere a nested data object's rows come from: an array column on a parent data object, unnested.
obsl:RefreshPolicyFreshness contract describing how the physical table behind a DataObject refreshes.
obsl:DimensionA grouping or filtering attribute exposed to analysts.
obsl:MeasureAn aggregated numeric value derived from a source column or expression.
obsl:WithinGroupOrdering clause for ordered-set aggregates (LISTAGG).
obsl:MetricA derived, cumulative, or period-over-period calculation built on top of one or more measures.
obsl:CumulativeMetricA metric that applies a time-windowed aggregation over a base measure. Subclass of obsl:Metric.
obsl:PeriodOverPeriodMetricA metric that compares a measure's value across consecutive time periods using a date spine. Subclass of obsl:Metric.
obsl:WindowMetricA metric that applies a single-row-output SQL window function (RANK, DENSE_RANK, ROW_NUMBER, NTILE, LAG, LEAD, FIRST_VALUE, LAST_VALUE) optionally partitioned and ordered. Subclass of obsl:Metric.
obsl:RuleA declarative business rule over the model's dimensions, measures and metrics: a classification, eligibility, validation or constraint with a Boolean condition tree (comparisons, all/any/not, references to other rules).
obsl:ExternalConceptMappingA qualified link from a modeling element (SemanticModel, DataObject, Dimension, Measure, Metric) to a concept in an external ontology, with the SKOS mapping relation and its provenance (justification, source, ontology version, confidence).
obsl:ModelExampleA canonical example query authored alongside the semantic model so agents can discover what kinds of questions the model is designed to answer.
obsl:CustomExtensionVendor-keyed opaque metadata attached to any modeling element.

Properties

Grouped by the class they describe. Every property carries its full definition in obsl.ttl.

Model structure

PropertyDescription
obsl:countLabelPatternName/label template for synthesized count measures (the count's id is its label).
obsl:exposeCountsWhen true (default), synthesize a row-count measure for every countable data object.
obsl:hasDataObjectLinks a semantic model to one of its data objects.
obsl:hasDimensionLinks a semantic model to one of its dimensions.
obsl:hasExampleLinks a semantic model to one of its canonical example queries.
obsl:hasMeasureLinks a semantic model to one of its measures.
obsl:hasMetricLinks a semantic model to one of its metrics.
obsl:hasRuleLinks a semantic model to one of its business rules.
obsl:countLabelOptional name/label for a data object's synthesized count measure (the count's id is its label); overrides the model-level countLabelPattern.
obsl:countableWhen true (default), the model synthesizes a grain-anchored row-count measure for this data object (name == label, e.g.
obsl:hasColumnLinks a data object to one of its columns.
obsl:hasJoinLinks a data object to a join path originating from it.
obsl:hasRefreshPolicyLinks a data object to the freshness contract for its physical source table.
obsl:nestedInThe nested source a data object takes its rows from instead of, or in addition to, a table.
obsl:numClassOptional classification of a numeric column controlling aggregation behavior: categorical, additive, non-additive.
obsl:primaryKeyWhen true, this column is part of the data object's primary key (composite keys order-preserving).
obsl:columnFromSource column (in the originating data object) used in the join condition.
obsl:columnToTarget column (in the joined data object) used in the join condition.
obsl:joinRequiredWhen true, a row without a match on the other side of this join does not survive it: the join is compiled as an INNER JOIN rather than the default LEFT JOIN.
obsl:joinToTarget data object of a join path.
obsl:nestedInColumnThe parent's array column.
obsl:nestedInObjectThe parent data object whose array column supplies a nested object's rows.
obsl:maxStalenessRequired for mode='heartbeat'.
obsl:refreshAnchorOptional 'HH:MM' time-of-day anchor for interval mode.
obsl:refreshIntervalRequired for mode='interval'.
obsl:refreshModeRefresh mode: 'interval' (fixed cadence), 'heartbeat' (irregular, ETL pings), or 'static' (never changes).
obsl:refreshTimezoneIANA timezone name used to interpret refreshAnchor.

Dimensions, measures and metrics

PropertyDescription
obsl:viaForces a dimension's join path through a specific intermediate data object (role-playing dimensions).
obsl:anchorGrainData object whose grain a measure's expression is evaluated at, when that expression reads independent facts no join path reaches together.
obsl:anchoredToData object whose grain a column-less measure is anchored to when it aggregates over the object rather than a column (e.g.
obsl:delimiterSeparator string used by LISTAGG / string_agg aggregations between concatenated values.
obsl:filterContextExcludeDimension name whose query filter is excluded from this measure's context.
obsl:filterContextIncludeStatic filter condition added to this measure's context, as a human-readable expression string (e.g.
obsl:filterContextKeepOnlyDimension name whose query filter is kept (all others are excluded).
obsl:filterContextModeFilter context override mode for a measure: FIXED (ignore all query filters) or RELATIVE (inherit and modify).
obsl:filterExpressionHuman-readable expression string describing the measure's filter conditions (e.g.
obsl:grainExcludeDimension name excluded from inherited grain (RELATIVE mode).
obsl:grainIncludeDimension name added to grain.
obsl:grainKeepOnlyAdaptive grain dimension name (FIXED mode): effective grain = keepOnly ∩ query_dims.
obsl:grainModeGrain override mode for a measure: FIXED (start empty) or RELATIVE (inherit query dimensions).
obsl:hasWithinGroupLinks a LISTAGG-style ordered-set aggregate measure to its within-group ordering clause.
obsl:sourceColumnColumn that a measure aggregates over (when the measure is column-based, not expression-based).
obsl:withinGroupOrderSort direction for the within-group ordering clause: ASC or DESC.
obsl:baseMeasureMeasure that a cumulative metric is computed from (used when metricType is cumulative).
obsl:referencesMeasureMeasure referenced in a metric's expression.
obsl:timeDimensionDimension used as the time axis for cumulative or period-over-period metrics.
obsl:cumulativeTypeAggregation function for the cumulative window: sum, avg, min, max, count.
obsl:grainToDateGrain-to-date reset boundary for a cumulative metric: year, quarter, month, week.
obsl:windowRolling window size in periods for a cumulative metric.
obsl:comparisonComparison type for a period-over-period metric: ratio, difference, previousValue, percentChange.
obsl:offsetPeriod offset for a period-over-period comparison (typically -1).
obsl:offsetGrainGrain of the offset period: day, week, month, quarter, year.
obsl:orderDirectionORDER BY direction for the window OVER clause: asc or desc.
obsl:windowBucketsBucket count for NTILE window metrics (>= 2).
obsl:windowDefaultValueDefault value to substitute when LAG / LEAD would return NULL (the three-argument form).
obsl:windowFunctionWindow function family for a window metric: rank, dense_rank, row_number, ntile, lag, lead, first_value, last_value.
obsl:windowOffsetRow offset for LAG / LEAD window metrics (>= 1).

Business rules

PropertyDescription
obsl:dependsOnRuleA rule this rule's condition references.
obsl:ruleConditionThe condition tree as a serialized JSON document in the OBML shape (field/op/value comparisons, all/any/not, rule references).
obsl:ruleGrainA dimension an aggregate rule is evaluated at (one triple per dimension).
obsl:ruleLevel'row' when the rule reads dimensions only (a WHERE predicate), 'aggregate' when it reads a measure or metric (a HAVING predicate at the rule's grain).
obsl:ruleReadsA dimension, measure or metric the rule's condition compares, references through other rules included.
obsl:ruleSeverityFor validation and constraint rules: 'info', 'warning' or 'error'.
obsl:ruleTypeOne of 'classification', 'eligibility' (members: rows or groups the condition holds for), 'validation', 'constraint' (an invariant: evaluation reports where it does not hold).

External concept mappings

PropertyDescription
obsl:authoredConceptThe concept exactly as written in OBML: a compact IRI such as 'corp:NetRevenue' or a full IRI.
obsl:confidenceConfidence in the mapping, a decimal between 0 and 1.
obsl:mappingCommentFree-text note on the mapping (approval, caveat, rationale).
obsl:mappingJustificationHow the mapping came to exist: 'curated', 'imported', 'generated', 'inferred' or 'lexical'.
obsl:mappingRelationHow the source object relates to the target concept, read source-first in the SKOS direction: 'exact' (skos:exactMatch), 'close' (skos:closeMatch), 'broader' (skos:broadMatch --- the external concept is the broader one), 'narrower' (skos:narrowMatch --- the external concept is the narrower one), 'related' (skos:relatedMatch).
obsl:mappingSourceWhere the mapping comes from: a catalog, ontology or process name.
obsl:ontologyVersionVersion of the external ontology the target concept was taken from.
obsl:sourceObjectThe modeled element an ExternalConceptMapping describes (the subject of the skos mapping triple).
obsl:targetConceptThe external concept the mapping points at, as an absolute IRI (the authored compact IRI expanded with the model's ontology prefixes).

Examples and extensions

PropertyDescription
obsl:exampleDescriptionOne- or two-sentence human explanation of what the example demonstrates.
obsl:exampleNameSnake_case identifier for a ModelExample, unique within its parent model.
obsl:exampleQuerySerialized QueryObject payload (typically JSON) — a valid query against the parent model.
obsl:intentTagFree-form tag on a ModelExample used by ?intent= filters at the examples API surface.
obsl:extensionDataOpaque vendor payload for a CustomExtension (typically a serialized string — JSON or YAML).
obsl:vendorVendor identifier for a CustomExtension block (e.g.

Shared (no fixed domain)

PropertyDescription
obsl:aggregationAggregation function applied to the measure.
obsl:allowFanOutWhen true, permits this measure to be queried along fan-out join paths (bypasses fan-trap prevention).
obsl:belongsToModelInverse convenience link from any model element back to its parent semantic model.
obsl:cardinalityJoin cardinality between data objects: many-to-one, one-to-one, many-to-many.
obsl:codeMachine-readable identifier or physical name (e.g., SQL column name, table name).
obsl:columnColumn that a dimension or measure is bound to.
obsl:dataObjectData object that a dimension draws its values from.
obsl:dataTypeExplicit data type for CAST wrapping (e.g.
obsl:databaseDatabase or catalog name where the data object resides.
obsl:defaultValueValue to report when there is nothing to compute from: an aggregate over no rows, or a window function with no row at the offset it asks for.
obsl:distinctWhen true, the measure applies DISTINCT to its aggregation (e.g., COUNT DISTINCT).
obsl:expressionSourceExpression string defining a computed column, a calculated measure, or a metric.
obsl:formatDisplay format pattern (e.g.
obsl:hasCustomExtensionLinks any modeled element (SemanticModel, DataObject, Column, Dimension, Measure, Metric) to a vendor-keyed opaque metadata block.
obsl:hasExternalConceptMappingLinks a modeled element (SemanticModel, DataObject, Dimension, Measure, Metric, Rule) to one of its external concept mappings.
obsl:metricTypeKind of metric calculation: derived, cumulative, period_over_period.
obsl:ownerResponsible team or person for this element.
obsl:partitionByDimension label used as a PARTITION BY key for a cumulative or window metric.
obsl:pathNameNamed join path used when a dimension reaches its data object through a non-default route.
obsl:physicalNamePhysical SQL name when it differs from the code value.
obsl:referencesColumnColumn referenced by a formula — an expression-based measure's, or a computed column's.
obsl:resultTypeAbstract data type of the value: string, int, float, date, time, timestamp, boolean, json, time_tz, timestamp_tz.
obsl:schemaDatabase schema containing the data object.
obsl:secondaryWhen true, marks a join as a secondary join path (not the default path between two data objects).
obsl:synonymAlternative name for an element, used for natural-language search and LLM disambiguation.
obsl:timeGrainTime granularity.
obsl:totalWhen true, the measure computes a grand total across all dimension values (ignores GROUP BY).

Links

GitHub · Documentation · OBSL graph and SPARQL guide · Business rules · External concept mappings


© RALFORION d.o.o. · OBSL-Core 0.2