Cross-Dotabase Derivations

Materialize derived rows across Dotabases through idempotent batch runs and real-time event bindings.

Overview

Description

Cross-Dotabase Derivations project source rows into another Dotabase through explicit mappings, with both backfill and real-time event execution.

A derivation binding names the source and target, selects eligible lifecycle events, maps source values into declared target properties, and defines a deterministic identity for the projection. The service can sweep existing rows in bounded batches or react to new events. Repeated runs resolve the same target identity, so a backfill and the real-time path converge instead of creating duplicate rows.

Selling Points

  • Builds operational projections without duplicating hand-maintained data.
  • Uses deterministic identity keys for idempotent reruns.
  • Keeps source and target ownership explicit.
  • Supports a bounded backfill before event-driven maintenance begins.
  • Records binding configuration as durable tenant-scoped data.

User Story

As an operations lead, I derive a task or customer record from source knowledge and keep the projection current. I define which source rows qualify, how their fields map to the target schema, and the identity that makes each projection stable. I run an initial backfill and then enable the event binding. I walk away with a purpose-built operational view that updates predictably while target fields outside the derivation's ownership remain available for local work.

Extension Surface

Configurable: bindings choose source, target, event triggers, identity, and property mappings.

packages/dotabases/src/services/derivation-binding-service.ts manages this configuration as tenant-scoped records. Owners compose supported mappings and triggers; they do not upload arbitrary transformer code. The actual projection contract in packages/dotabases/src/services/derivation-service.ts keeps target writes inside Dotabase schema and lifecycle rules.

Capabilities & Limits

  • Capability: Executes the scoped workflow described above through the cited live implementation paths.
  • Capability: Preserves typed validation and applicable tenant, schema, lifecycle, or service boundaries.
  • Limit: Derivation maps declared data; it is not an arbitrary code execution engine. A target's independently owned fields must remain untouched. The feature supports idempotent batch materialization, real-time event execution, stable source-to-target identity, and explicit field ownership. It cannot express open-ended computation or safely overwrite target data owned by another workflow. Both Dotabases and every mapped property must exist and remain compatible for a binding to run successfully.

Implementation Map

  • packages/dotabases/src/services/derivation-service.ts
  • packages/dotabases/src/services/derivation-binding-service.ts
  • packages/db/src/schema/derivation-bindings.ts

Properties

Property
Value
product
dots-platform
extensibility
configurable
module
Dotabases
packages
dotabases, db
status
shipped
surface
background
summary
Materialize derived rows across Dotabases through idempotent batch runs and real-time event bindings.

Connections

Cross-Dotabase Derivations · Explore connections

  • requirestoDotabase Workspaces
  • implemented bytobuildDerivationService
  • implemented bytoderivationBindings
  • implemented bytobuildDerivationBindingService
  • implemented bytopackages/dotabases/src/internal/services/derivation-service.ts
  • implemented bytopackages/dotabases/src/internal/services/derivation-binding-service.ts
  • implemented bytopackages/db/src/schema/derivation-bindings.ts
  • implementstoDS_Dotabases — Comprehensive Module Spec
  • complementstoDeterministic Property Fill

Connected Records9

Complements
Implemented by
buildDerivationBindingService
buildDerivationService
derivationBindings
packages/db/src/schema/derivation-bindings.ts
packages/dotabases/src/internal/services/derivation-binding-service.ts
packages/dotabases/src/internal/services/derivation-service.ts
Implements
DS_Dotabases — Comprehensive Module Spec
Requires
9 connections.