Logo
NeoArc Studio

Schema Inheritance and Lineage

Build on existing schemas with inheritance. Track model-first lineage from schema fields to entity properties in the data model, with field-level tracing and lineage overrides.

Schema inheritance reduces duplication by letting child schemas build on parent definitions. Lineage tracking connects each field to its corresponding property in the data model (model.neoarc), documenting the path from schema fields to canonical model entities.

Schema Inheritance

Object schemas can extend other schemas using the extends property. The child schema inherits all fields from its parents and can add additional fields specific to its context.

Adding Inheritance

Inheritance Validation

The schema editor validates inheritance to prevent common problems.

ValidationDescriptionSeverity
Cycle DetectionCircular inheritance is not allowed. Schemas with circular dependencies cannot be saved.Error
Duplicate Field WarningsSame field name in multiple parent schemas. First definition takes precedence.Warning
Deep Inheritance WarningsChains deeper than 5 levels trigger a warning. Maximum supported depth is 10.Warning

Model-First Lineage

Lineage tracking documents where field data originates by mapping schema fields to entity properties in the data model. Each lineage entry uses sourceType: "graph" with graphFilePath: "model.neoarc" to reference the canonical model.

Lineage Entry Structure

Model lineage entry fields
FieldDescription
sourceTypeSet to "graph" for model lineage
graphFilePathPath to the model file (model.neoarc)
nodeNameThe entity name in the model (e.g. Customer, Order)
nodeIdUnique identifier of the model entity node
propertyNameThe specific property on the entity (e.g. Email, OrderDate)
{
  "sourceType": "graph",
  "graphFilePath": "model.neoarc",
  "nodeName": "Order",
  "nodeId": "f1e2d3c4-b5a6-4978-8d9e-0f1a2b3c4d5e",
  "propertyName": "OrderDate"
}

Adding Lineage to a Field

Lineage Overrides in Child Schemas

When extending schemas, child schemas often need different lineage mappings than the parent. Lineage overrides allow each derived schema to point inherited fields to the correct model entity and property.

How Overrides Work

Setting Up Lineage Overrides

Object Field Lineage Overrides

When using an Object field that references another schema, you can override lineage for the embedded fields. Select the Object field, open Lineage Overrides, and add lineage entries for specific fields within the referenced schema.

Field-Level Tracing to Model Entities

Each lineage mapping creates a maps-to edge in the Intent Graph, connecting the schema field node to the model entity property. This enables several capabilities:

Impact Analysis
Before changing a model entity property, query the Intent Graph to find all schema fields that map to it
Data Governance
Document the model source of every field exposed through API contracts
Debugging
Trace data issues from an API response field back to its model entity property
Compliance
Demonstrate data provenance for audit and regulatory requirements

Common Inheritance Patterns

Base Entity Pattern
Create a base schema with id, createdAt, updatedAt. All entity schemas extend this base and override lineage for id.
Request/Response Pattern
Core schema for entity fields. Separate request and response schemas extend it with context-specific lineage.
Audit Fields Pattern
Audit schema with createdBy, modifiedBy, version. Schemas requiring audit trails extend this and map lineage to their model entity.

Best Practices