Logo
NeoArc Studio

Schema Lineage Reference

Complete reference for schema lineage tracking, covering the SchemaFieldLineage interface, model-first field mapping, multiple entries, lineage overrides, and Intent Graph integration.

Schema lineage maps schema fields to entity properties in the data model (model.neoarc). This reference covers the full lineage interface, all available fields, override behaviour, and how lineage integrates with the Intent Graph.

SchemaFieldLineage Interface

Each lineage entry on a schema field conforms to the following structure:

interface SchemaFieldLineage {
  sourceType: "graph";
  graphFilePath: string;   // Path to the model file, e.g. "model.neoarc"
  nodeName: string;        // Entity name, e.g. "Customer"
  nodeId: string;          // UUID of the entity node
  propertyName: string;    // Property name, e.g. "Email"
  notes?: string;          // Optional transformation notes
}

Field Reference

SchemaFieldLineage fields
FieldTypeRequiredDescription
sourceTypestringYesSet to "graph" for model lineage. This indicates the lineage target is a node property in the model.
graphFilePathstringYesPath to the model file. Typically "model.neoarc". Resolved relative to the workspace root.
nodeNamestringYesDisplay name of the entity in the model (e.g. "Customer", "Order", "Product").
nodeIdstringYesUUID of the entity node in the model file. Used for stable references that survive entity renames.
propertyNamestringYesName of the property on the entity (e.g. "Email", "OrderDate", "TotalAmount").
notesstringNoFree-text notes describing transformations, business rules, or context.

Example Lineage Entry

{
  "sourceType": "graph",
  "graphFilePath": "model.neoarc",
  "nodeName": "Customer",
  "nodeId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "propertyName": "Email"
}

Multiple Lineage Entries

A single schema field can have 0 or more lineage entries. Each entry maps to one model property.

Scenarios requiring multiple lineage entries
ScenarioExample
ConcatenationA FullName schema field maps to both Customer.FirstName and Customer.LastName
Cross-entity referencesA schema field sources from properties on different model entities
Foreign key mappingAn orderId field maps to Order.Id in the model
No mappingComputed or derived fields may have 0 lineage entries
[
  {
    "sourceType": "graph",
    "graphFilePath": "model.neoarc",
    "nodeName": "Customer",
    "nodeId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "propertyName": "FirstName",
    "notes": "Concatenated with LastName, separated by a space"
  },
  {
    "sourceType": "graph",
    "graphFilePath": "model.neoarc",
    "nodeName": "Customer",
    "nodeId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "propertyName": "LastName",
    "notes": "Concatenated with FirstName, separated by a space"
  }
]

Lineage Notes

Each lineage entry supports an optional notes field for documenting transformations or business rules applied to the data.

Transformation documentation examples
TransformationExample Note
ConcatenationCombined from FirstName and LastName with space separator
Format conversionConverted from Unix timestamp to ISO 8601
CalculationComputed as Quantity multiplied by UnitPrice
Enum mappingModel stores integer code, schema exposes string label
Default valueDefaults to 'active' when model property is null

Lineage Overrides

Lineage overrides allow child schemas to replace inherited lineage with mappings specific to their context.

Inheritance Override Scenario

Object Field Overrides

When a schema uses an Object field that references another schema, you can override lineage for individual fields within that referenced schema. This is useful when the same schema type is reused in different contexts that map to different model entities.

Lineage in the Intent Graph

Each lineage mapping creates a maps-to edge in the Intent Graph:

Edge ComponentDescription
Source nodeSchema Field node, representing the individual field in the schema
Target nodeModel Property node, representing the entity property in model.neoarc
Edge typemaps-to
Semantic meaningThe schema field derives its data from this model property

These edges enable querying in both directions:

Query DirectionQuestion Answered
Forward (schema to model)Where does this schema field get its data from?
Reverse (model to schema)Which schema fields depend on this model property?
Transitive (endpoint to model)Which model properties does this API endpoint ultimately depend on?

Lineage Indicators