Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/services/schema-detection/utilities/geo

lib/services/schema-detection/utilities/geo

Structural pattern detection utilities.

Provides detection of ID fields and enumeration fields based on data characteristics (not column names).

Functions

detectIdFields()

detectIdFields(fieldStats, options?): string[]

Detects potential ID fields based on naming patterns and characteristics.

Parameters

fieldStats

Record<string, FieldStatistics>

options?

DetectionOptions

Returns

string[]


detectEnumFields()

detectEnumFields(fieldStats, config?): string[]

Detects enumeration fields based on low cardinality.

Parameters

fieldStats

Record<string, FieldStatistics>

config?

DetectionOptions | { enumThreshold?: number; enumMode?: "count" \| "percentage"; }

Returns

string[]


detectPatterns()

detectPatterns(fieldStats, config?, options?): PatternResult

Detect all structural patterns in field statistics.

Parameters

fieldStats

Record<string, FieldStatistics>

config?
enumThreshold?

number

enumMode?

"count" | "percentage"

options?

DetectionOptions

Returns

PatternResult


enrichEnumFields()

enrichEnumFields(fieldStats, config): void

Detects enumeration fields and mutates field statistics in place.

Sets stats.isEnumCandidate and stats.enumValues directly on the provided field stats. This is used by the schema builder after all batches are processed.

Parameters

fieldStats

Record<string, FieldStatistics>

config
enumThreshold

number

enumMode

"count" | "percentage"

Returns

void


looksLikeId()

looksLikeId(value): boolean

Checks if a value looks like an ID.

Parameters

value

unknown

Returns

boolean


looksLikeCoordinate()

looksLikeCoordinate(value, type): boolean

Checks if a value looks like a geographic coordinate.

Parameters

value

unknown

type

"lat" | "lng"

Returns

boolean

Last updated on