Repository navigation
v0.9.0
Changelog
Added
-
Entities, marts and step-produced columns take a
label:. An entity's label reaches
the MetricFlow entity that stands for it, a mart's becomes MetricFlow's semantic model
labeland Cube's cube and viewtitle, and a manifest'sproduces:column label
reaches the output entity's column as a mapped field's does. No SQL changes, and
changing one is metadata only inplan()andtimeline(); a step whose column label
changed is not restated. (#373) -
A field mapping can set a constant.
marketplace: {const: Wildberries}sets the field to
one literal for every row the mapping lands, typed against the field's declaration when
the project compiles and reading no source path. Two marketplaces feeding one merged
entity each name their rows, and a single mapping can too. Lineage shows no source
column for the field, and a value outside the field's type is refused with its path.
(#375) -
unit: ratiofor a dimensionless factor. A canonical field holding a percentage, a
VAT rate, a ±1 sign or a 0/1 flag declaresunit: ratio, and like a count it carries no
tax basis. Soprice * (100 - discount) / 100 - costcompiles instead of being refused
as an unknown basis beside money, andprice + discountis still aUnitMismatch.
(#367) -
A metric template can read a per-unit field of a many-to-one parent. A catalog field
that is a rate rather than an amount, such as a product's unit cost, declares
per_unit: true. A template at order-line grain can then compute
product_cost * line_quantity: the grain guard admits the field read down one
many-to-one relationship, and each mart reads the column it flattened the field into,
under its own prefix. An amount of the parent, such as order shipping read per line, is
refused as before. (#366) -
A metric says which direction of change is good news.
better: higher,loweror
neitheron a metric or its catalog template reaches MetricFlow asconfig.meta.better
and Cube as the measure'smeta.better, so a dashboard colouring a delta or reading a
target on a cost as a ceiling takes it from the spec. A metric that does not say emits
nothing, and a ratio or derived metric does not take it from its parts. No SQL changes.
(#364)
Changed
bloomery_ir_versionis 31. The IR gainsMetricIR.better(#364), andEntityIR.label,
MartIR.labelandStepColumnIR.label(#373). Every project re-fingerprints once on
upgrade, andplan()refuses to diff an artifact set compiled by 0.8 against one compiled
by this version: re-baseline after upgrading.
Fixed
-
A relationship may name a step output, so a mart can flatten what a step computes,
such as revenue by the buyer's segment. Itsviacolumns are checked against the step's
produces, and areferentialrule orcoverage:check through one is refused when
the step reads the dependent entity, a cycle. (#362) -
Two entities whose referential rules join each other are refused. Each rule is a
LEFT JOIN inside its entity's model, so the pair compiled to two models that each read
the other, which no engine can build. The refusal names the chain of reads. (#363) -
Lineage runs through a
sql_modelstep.resolve()takes the step registry as
steps=, and with it the graph draws the step to each column it produces, a metric over
a step output to the columns itsexprreads, and a step reading another step's output
from each of that output's columns. A walk from a step's input now reaches the metrics
over its output, and back. Without a registry, as inbloomery lineage, the graph is as
before. (#365) -
A metric template's filter and
semi_additive.overread the project's columns. Both
were read as one project's literal column names, so a template filtering on
deal_outcomeor reading a snapshot overstock_atcould not be used by a project
that spells those columns otherwise. A filter name that no mart listing the metric
carries, or anoverthe grain entity has no column for, now reads the one grain column
that links it as its canonical, as the template'sexpralready did. A name that is
already a column keeps it, so every spec that compiled reads what it read. (#368)