Logo
NeoArc Studio

Data Projections

Create data projections that transform model entities for specific database targets with vendor-specific type resolution, naming conventions, and structural transformations.

Purpose-Specific Database Representations

Each data projection targets a specific database or data store. A database profile controls type resolution, so a model property of type string becomes varchar(255) in PostgreSQL, nvarchar(max) in SQL Server, or String in MongoDB. Property names, types, and structures can all transform to match the conventions of the target system. The canonical model stays unchanged - the projection handles the translation.

The Transformation Engine

Data projections use nine transformation types to map model properties to database columns. Each type serves a specific purpose, from straightforward copies to complex multi-field calculations.

TypeDescription
DirectCopy the value as-is from source to target. The simplest mapping, used when the field name and type match.
RenameCopy the value but change the field name. Useful for adapting to database naming conventions (camelCase to snake_case).
Type-CastConvert the value to a different type. For example, a string date field becomes a native date column in the database.
AggregateCompute an aggregate value from a collection. Count, sum, average, min, max over related entities.
ConcatenateCombine multiple source fields into a single target field. Join first name and last name into a full name column.
CalculateApply arithmetic or date calculations. Derive age from date of birth, or compute a total from quantity and unit price.
DeriveCreate a field that does not exist in the source model. Surrogate keys, audit timestamps, and computed flags.
SplitBreak a single source field into multiple target fields. Split an address string into street, city, and postcode columns.
CustomWrite a free-form expression using field references, functions, and conditional logic for cases that do not fit the other types.

Expression Builder

For complex transformations, the expression builder provides a structured way to define mapping logic. It supports field references using {entity.field} syntax, SQL-like functions for string manipulation, date arithmetic, and mathematical operations. CASE/WHEN statements handle conditional transformations, and explicit CAST operations control type conversion. Expressions are stored as structured data in the projection JSON file, making them readable in pull request diffs.