Nest Engineering Docs
Handler

Data model

Storage, schemas, and data ownership for Handler

Source of truth

  • Cloud Spanner is the authoritative datastore for normalized PIMS and Bubble data.

Primary domains

Handler writes data for a wide range of entities, including:

  • Organizations, clinics, households, patients
  • Appointments, appointment types/statuses
  • Team members, products, invoices
  • Bubble entities (subscriptions, benefits, payment plans, etc.)

Pipeline status

  • Pipeline runs update status timestamps in Spanner to support incremental sync.
  • Status updates land in the Pipelines table keyed by organization_id and name (pipeline name), with last_modified used by Stream for scheduling.

Batch write behavior

  • Spanner writes are chunked by SpannerBatchWriteService to honor the 80,000 mutation limit.
  • SpannerLoader computes index-aware row costs per UpsertStep.

Data ownership

  • Handler owns transformation and normalization logic, but not the source data.

Last updated on