Skip to main content

Manage ingestion mappings

Outcome

A mapping definition that turns a vendor's raw inbound rows (member rosters, charge files, eligibility files) into the platform's canonical entities, dry-run-tested against a real sample, and published with a clear version history.

Prerequisites

ScopeWhat it lets you do
ingestion.mapping.readView mappings and versions
ingestion.mapping.writeCreate / edit drafts, run dry runs
ingestion.mapping.publishPublish a draft as the new active version

A registered ingestion feed that this mapping will be bound to — see 5.7 — Manage SFTP feeds & Push API keys. Mappings created without a feed binding are valid but inert.

Anatomy of a mapping

A mapping definition is YAML with three blocks:

# Source schema — what the incoming row looks like
source:
format: CSV # or X12, FHIR, HL7v2, FIXED_WIDTH
encoding: utf-8
fields:
- name: member_external_id
- name: dob
- name: payer_code

# Target — which canonical entity to produce
target: member

# Field mappings — how to fill the target
mappings:
- target: externalId
source: member_external_id
- target: dateOfBirth
source: dob
transform: parseIsoDate
- target: coveragePolicies[0].payerAlias
source: payer_code

# Validations — fail the row if these don't hold
validations:
- field: externalId
rule: required
- field: dateOfBirth
rule: notFuture

Steps

  1. Pick Configuration → Ingestion → Mappings at /admin/ingestion/mappings. Each row shows the mapping name, target entity, the feed it is bound to, and the active version number.

  2. Click + New mapping or open an existing one. The detail page has three sub-views:

    ViewWhat it does
    YAMLFull Monaco YAML editor. The most expressive option.
    VisualForm-based field mapper, transform picker, validation builder. Good for quick edits.
    PreviewDrag-drop a sample file and see how rows map.

    The Visual view writes the same YAML — switch between them freely.

  3. Use the Visual view's FieldMapper to drag a source field onto a target field. The platform auto-suggests transforms when source and target types disagree (e.g. string → date suggests parseIsoDate). Add a transform from the picker, or chain several.

  4. Add validations under the validation builder. Common checks:

    RuleMeaning
    requiredReject the row if the field is empty.
    regexMatch a pattern.
    oneOfValue must come from a small set.
    notFutureDate cannot be in the future.
    rangeNumeric range.
  5. Dry-run the draft with the Preview view. Drop a sample file (CSV / X12 / FHIR / HL7v2 / fixed-width). The platform parses it client-side, runs your mapping's transforms, and shows:

    • The first 50 rows transformed to the canonical shape.
    • Any validation failures with row + field highlighted.
    • A summary of pass / fail counts.

    Iterate the YAML until the preview is clean.

  6. Save the draft. Drafts are client-only — closing the page does not lose them, but they don't activate any production behavior either.

  7. Publish with Publish version. The platform validates the YAML one last time against the kind's schema, increments the version, and makes the new version active for the bound feed.

Diff between versions

The detail page's History tab lists every published version with the publishing user and timestamp. Click two versions and pick Diff to see the YAML diff side-by-side. Useful when a recent run produces unexpected rows and you need to confirm what changed.

Validation

CheckExpected
Preview produces clean rows on a sample fileYes.
Published version visible in History tabYes.
Bound feed picks up the new version on next batchYes — subsequent batches log the version number.

Troubleshooting

SymptomCauseFix
Preview row count is 0Source format guess is wrongSet source.format explicitly; e.g. tab-delimited CSV needs delimiter: "\t".
Transform suggestion missingSource field type unknownAdd an explicit type: to the source field block.
Publish blocked: "schema mismatch"YAML drifted from the kind's zod schemaThe error message points at the line; fix and retry.
Live batch fails after publishThe new version's transform throws on an edge-case rowOpen the batch, copy the failing row, paste into Preview to reproduce; fix and republish.

Next

5.6 — Manage trading partner credentials