Conflict Types Reference
Complete reference for all transformation conflict types detected during projection mapping, including type conversion, truncation, null handling, precision loss, enum narrowing, pattern mismatch, uniqueness, and multi-input conflicts.
When a source property is mapped to a target property in a projection, the transformation conflict service analyses the property shapes and detects potential data loss, type incompatibilities, and constraint violations. Each conflict includes a severity level, category, human-readable message, and a set of resolution options.
Conflict Model
export type ConflictSeverity = 'error' | 'warning' | 'info';
export type ConflictCategory = 'type' | 'constraint' | 'multi-input';
export interface Conflict {
ruleId: string;
severity: ConflictSeverity;
category: ConflictCategory;
message: string;
resolutionOptions: ResolutionOption[];
}
export interface ResolutionOption {
id: string;
label: string;
requiresInput?: boolean;
inputLabel?: string;
inputType?: 'text' | 'select' | 'expression';
selectOptions?: { label: string; value: string }[];
}
Severity Levels
| Severity | Connector Colour | Meaning |
|---|---|---|
| error | Red | The mapping will produce incorrect or impossible results without resolution. The architect must choose a resolution strategy before the mapping can be considered complete. |
| warning | Amber | The mapping may produce data loss or unexpected behaviour. Resolution is recommended but the mapping can proceed. |
| info | Blue | The mapping is valid but involves a type widening or other notable transformation. No action required. |
Conflict Categories
| Category | Description |
|---|---|
| type | Source and target properties have different abstract types. Detected by comparing the type field of each PropertyShape. |
| constraint | Source and target have the same or compatible types but differ in constraints (maxLength, nullability, value range, enum values, pattern, uniqueness). |
| multi-input | Multiple source properties map to a single target property. Requires specifying how the values should be combined. |
Type Conflicts
Detected when the source and target abstract types differ. The severity depends on the direction of the conversion.
Safe Type Widenings (info)
The following type conversions are considered safe and produce info-level notifications only. No resolution is required.
| Source Type | Safe Target Types |
|---|---|
| integer | string, text, float, decimal |
| float | string, text, decimal |
| decimal | string, text |
| boolean | string, text |
| date | string, text, datetime |
| uuid | string, text |
| enum | string, text |
Specific Type Conflict Rules
The following type conversions trigger specific conflict rules with tailored resolution options.
| Rule ID | Conversion | Severity | Resolution Options |
|---|---|---|---|
| type-uuid-to-integer | uuid/guid to integer | error | Count (aggregation), Count Distinct, Hash to integer, Custom expression |
| type-string-to-integer | string to integer | error | Parse (with error handling), Count (aggregation), Custom expression |
| type-float-to-integer | float to integer | warning | Round, Floor, Ceiling, Truncate |
| type-decimal-to-float | decimal to float | warning | Accept precision loss, Custom expression |
| type-datetime-to-date | datetime to date | warning | Truncate time, Accept (time is not meaningful) |
| type-boolean-to-integer | boolean to integer | info | Standard (true=1, false=0), Custom values |
| type-json-to-string | json to string | warning | Serialise (JSON.stringify), Extract path (JSON path), Custom expression |
| type-mismatch | Any other type mismatch | error | Cast to target type, Custom expression |
Constraint Conflicts
Detected when source and target have compatible types but constraints that could cause data loss or rejection.
| Rule ID | Condition | Severity | Resolution Options |
|---|---|---|---|
| constraint-truncation | Source maxLength exceeds target maxLength | warning | Truncate at target length, Truncate with ellipsis, Reject (fail if exceeds), Use default value |
| constraint-null-required | Source is nullable but target is required | warning | Default value, Coalesce from another field, Reject nulls (fail pipeline) |
| constraint-overflow | Source maxValue exceeds target maxValue | warning | Clamp to target max, Reject (fail if exceeds), Use default value, Scale proportionally |
| constraint-underflow | Source minValue is below target minValue | warning | Clamp to target min, Absolute value, Reject (fail if below), Use default value |
| constraint-enum-narrowing | Source enum values not present in target enum | warning | Map each value explicitly, Reject unmapped values, Use default for unmapped, Set unmapped to null |
| constraint-pattern | Target requires a regex pattern the source may not satisfy | warning | Transform to match pattern (expression), Reject non-matching values, Use default for non-matching |
| constraint-uniqueness | Source is not unique but target requires uniqueness | warning | Deduplicate (keep first), Deduplicate (keep last), Deduplicate (aggregate), Reject duplicates |
Multi-Input Conflicts
Detected when more than one source property maps to a single target property. The resolution depends on the target type.
| Rule ID | Target Type | Severity | Resolution Options |
|---|---|---|---|
| multi-input-string | string or text | warning | Concatenate with space, Concatenate with comma, Concatenate with custom separator, First non-null, Last non-null, Custom expression |
| multi-input-numeric | integer, float, or decimal | warning | Sum, Average, Minimum, Maximum, First non-null, Last non-null, Custom expression |
| multi-input-general | Any other type | warning | First non-null, Last non-null, Custom expression |
Resolution Persistence
When an architect resolves a conflict, the resolution is stored on the TransformationMapping in the projection document.
export type ResolutionStatus = 'unresolved' | 'resolved' | 'accepted-as-is';
export interface TransformationResolution {
status: ResolutionStatus;
typeConversion?: TypeConversionResolution;
truncation?: TruncationResolution;
nullHandling?: NullHandlingResolution;
precision?: PrecisionResolution;
enumMapping?: EnumMappingResolution;
multiSource?: MultiSourceResolution;
notes?: string;
}
Resolution Sub-Types
| Resolution Type | Fields | Used By |
|---|---|---|
| TypeConversionResolution | strategy (string), expression (optional string) | type-mismatch, type-string-to-integer, type-json-to-string |
| TruncationResolution | strategy ('truncate' | 'ellipsis' | 'reject' | 'default'), defaultValue (optional) | constraint-truncation |
| NullHandlingResolution | strategy ('default' | 'coalesce' | 'reject'), defaultValue (optional), coalesceField (optional) | constraint-null-required |
| PrecisionResolution | strategy ('round' | 'floor' | 'ceiling' | 'truncate' | 'reject') | type-float-to-integer, type-decimal-to-float |
| EnumMappingResolution | valueMappings (Record of source to target), unmappedStrategy ('reject' | 'default' | 'null' | 'pass-through'), defaultValue (optional) | constraint-enum-narrowing |
| MultiSourceResolution | Defined per multi-input conflict resolution | multi-input-string, multi-input-numeric, multi-input-general |
Connector Status Indicators
In the projection editor, each mapping connector line displays a visual indicator based on its conflict status.
| Status | Visual | Meaning |
|---|---|---|
| unresolved-error | Red connector with warning badge | At least one error-severity conflict has no resolution. Requires architect attention. |
| unresolved-warning | Amber connector with warning badge | At least one warning-severity conflict has no resolution. Resolution recommended. |
| resolved | Green connector with check badge | All conflicts have been resolved by the architect. |
| accepted | Green connector with check badge | All conflicts have been explicitly accepted as-is (no changes needed). |
| clean | Default connector (no badge) | No conflicts detected. Source and target are fully compatible. |