Skip to content

Calculated Fields (Developer) ​

Profile JSONB column calculated_fields (migration 0024).

Shape ​

json
[{ "key": "heat_index", "expression": "temperature * 1.1 + humidity * 0.05", "enabled": true }]

Runtime ​

  • Service: CalculatedFieldsService.applyForDevice
  • Hook: TelemetryService.ingestForResolvedDevice after data pipeline, before rule engine
  • Evaluator: evaluateExpression in pipelineStepRunner.ts (numeric keys only; expression must reduce to digits and + - * / ( ))
  • Kill switch: CALCULATED_FIELDS_ENABLED

Expressions that fail validation are skipped (fail-open). The same evaluator is used by pipeline derive_key and rule-engine enrich steps.

API ​

Included on device profile create/update DTOs as calculatedFields.

support@autoconnecto.in · founder@autoconnecto.in · +91 92121 00555 · app.autoconnecto.in