Schemas
TestCase
inputsdict[var_name, series] for formula derivations; list[series] for rollup derivations. Each series is a list of [iso8601-timestamp, value] pairs.
expectedThe value run(inputs, row) must return for this case to pass.
rowExtra bound SPARQL variables (formula) or {"node": "
TestCaseResult
passedactualWhat run() actually returned, or null if it errored.
expectederrorCreateDerivationRequest
namefn_sourcePython source defining def run(inputs, row): ... Executed in a restricted sandbox - see this document's security note.
kindselectformula only. SPARQL SELECT binding target_var and every name in input_vars/extra_vars.
target_varformula only.
input_varsformula only. Bound to fn's inputs dict, each read as a point history series.
extra_varsformula only. Bound SPARQL variables passed through to fn's row as raw values, not read as point histories (e.g. a threshold literal).
formula only. Per-input_var override of window_seconds, for mixing points with very different update cadences.
root_selectrollup only. SPARQL SELECT binding ?root, one row per top-level entity to roll up.
part_relationshiprollup only. Parent->child predicate CURIE to walk, e.g. brick:hasPart.
leaf_point_classrollup only. Brick class CURIE identifying which directly-attached points at any tree node count as leaf inputs, e.g. brick:Meter.
window_secondsinterval_secondsOverrides the engine's default sweep tick for this derivation only.
applies_to_topic_globformula only. When set, an incoming MQTT message matching this glob triggers an immediate targeted re-evaluation in addition to the periodic sweep.
depends_onIds of other derivations that must be evaluated first in the same sweep.
Derivation
idnamefn_sourcePython source defining def run(inputs, row): ... Executed in a restricted sandbox - see this document's security note.
kindselectformula only. SPARQL SELECT binding target_var and every name in input_vars/extra_vars.
target_varformula only.
input_varsformula only. Bound to fn's inputs dict, each read as a point history series.
extra_varsformula only. Bound SPARQL variables passed through to fn's row as raw values, not read as point histories (e.g. a threshold literal).
formula only. Per-input_var override of window_seconds, for mixing points with very different update cadences.
root_selectrollup only. SPARQL SELECT binding ?root, one row per top-level entity to roll up.
part_relationshiprollup only. Parent->child predicate CURIE to walk, e.g. brick:hasPart.
leaf_point_classrollup only. Brick class CURIE identifying which directly-attached points at any tree node count as leaf inputs, e.g. brick:Meter.
window_secondsinterval_secondsOverrides the engine's default sweep tick for this derivation only.
applies_to_topic_globformula only. When set, an incoming MQTT message matching this glob triggers an immediate targeted re-evaluation in addition to the periodic sweep.
depends_onIds of other derivations that must be evaluated first in the same sweep.
TraceEntry
targetderivation_idcomputed_valuewould_write_uriwould_attach_towould_derive_fromerror
