Interface: DiscoveredFeatureDto
@kortexya/reasoninglayer / DiscoveredFeatureDto
Interface: DiscoveredFeatureDto
Section titled “Interface: DiscoveredFeatureDto”Defined in: src/types/sources.ts:101
A feature/field discovered from a data source.
Properties
Section titled “Properties”constraints?
Section titled “constraints?”
optionalconstraints?:DiscoveredConstraintDto[]
Defined in: src/types/sources.ts:103
Constraints discovered, each a typed value tagged by type.
description?
Section titled “description?”
optionaldescription?:string|null
Defined in: src/types/sources.ts:105
Human-readable description.
featureName
Section titled “featureName”featureName:
string
Defined in: src/types/sources.ts:141
The OSF feature name — the engine’s own OSFQL-readable spelling.
Remarks
Section titled “Remarks”Identical to name, and the unambiguous spelling of it. It is the counterpart of DiscoveredSortDto.sortName, so a client walking sorts and their features reads one convention for both.
Prefer it to deriving the name client-side: the derivation has to agree with an engine that refuses a name its parser cannot read bare.
identifierProvenance?
Section titled “identifierProvenance?”
optionalidentifierProvenance?:KeyProvenanceDto|null
Defined in: src/types/sources.ts:160
Which authority made this field the identifier, and what that key therefore guarantees. Present exactly when isIdentifier.
Remarks
Section titled “Remarks”⚠️ Read this before you pre-tick a “key” box for an operator.
isIdentifier alone does not separate a DECLARED primary key from
a GUESS: source: 'sampled_uniqueness' with guaranteedUnique: false
means every value in the SAMPLED rows was distinct and nothing beyond the
sample was checked.
The distinction is not cosmetic. A projected fact derives its term identity from the key, so a key that turns out not to be unique makes a re-ingest DUPLICATE facts instead of updating them. Without the provenance there is no way to present the guess as a guess — KeyProvenanceDto.explanation is the engine’s own sentence for it, written for an operator who does not know the vocabulary.
isIdentifier
Section titled “isIdentifier”isIdentifier:
boolean
Defined in: src/types/sources.ts:117
Whether the field is a primary key/identifier.
Remarks
Section titled “Remarks”For a CSV type at most one column is nominated, by sampled uniqueness
(identifierProvenance.source === 'sampled_uniqueness'), and none when
fewer than 10 rows were sampled. A candidate must be key-shaped: an
integer, or a string of at most 64 characters without whitespace. Ties go
to id/_id, then <table>_id, then any *_id, then the leftmost
column; the other sampled-distinct columns keep a unique constraint.
isRelation
Section titled “isRelation”isRelation:
boolean
Defined in: src/types/sources.ts:119
Whether the field is a relation.
name:
string
Defined in: src/types/sources.ts:121
Feature name.
relationTarget?
Section titled “relationTarget?”
optionalrelationTarget?:string|null
Defined in: src/types/sources.ts:123
Target sort if this is a relation.
required
Section titled “required”required:
boolean
Defined in: src/types/sources.ts:125
Whether the field is required.
sourceName
Section titled “sourceName”sourceName:
string
Defined in: src/types/sources.ts:127
Original source field name.
typeHint?
Section titled “typeHint?”
optionaltypeHint?:string|null
Defined in: src/types/sources.ts:129
Type hint (e.g., “VARCHAR(255)”, “integer”, “boolean”).