Skip to main content

@terascope/data-mate / teal-frame/interfaces

teal-frame/interfaces

Interfaces​

InterfaceDescription
AppendFailureEverything an append failure can say about itself.
AppendOptions-
CoercionFailureOne field's coercion failure, with the value that caused it.
CreatedTableA freshly created table and the column set its config declared.
DuckDatabaseOptionsSpill and resource settings for a database. All are runtime SETs.
DuckDatabaseSettingsSpill and resource settings for a database. All are runtime SETs.
ExtensionFailureWhat DuckExtensionError reports: every missing extension, and where it looked.
FieldPlanOne field's coercion and its DuckDB value conversion, resolved once per append.
FrameOptions-
FromRecordsOptions-
JoinOptionsHow to join two frames. Expressions are raw SQL written against the two aliases.
MissingExtensionA required extension that could not be loaded, and DuckDB's reason.
SelectOptionsOptions for TealFrame.select.

Type Aliases​

AppendSource​

AppendSource = { parquet?: never; records: readonly Record<string, unknown>[]; } | { parquet: string | readonly string[]; records?: never; }

Defined in: data-mate/src/teal-frame/interfaces.ts:124

What to add to a frame: parsed records, or Parquet files. Both go through the one append method.

Union Members​

Type Literal​

{ parquet?: never; records: readonly Record<string, unknown>[]; }


Type Literal​

{ parquet: string | readonly string[]; records?: never; }

One path, a list of paths, or a glob. Already typed and validated, so not re-coerced.


CoercionMode​

CoercionMode = "strict" | "lenient"

Defined in: data-mate/src/teal-frame/interfaces.ts:76


FrameConfig​

FrameConfig = DataTypeConfig | ReadonlyDataTypeConfig

Defined in: data-mate/src/teal-frame/interfaces.ts:9

A DataType configuration, however the caller happens to hold it.


SelectList​

SelectList = string | Readonly<Record<string, string>>

Defined in: data-mate/src/teal-frame/interfaces.ts:144

A SELECT list, either as a map or as verbatim SQL.

In the map form, { outputName: sqlExpression }, the keys become the output column names. A string is used verbatim, as QueryAccess.restrictSQLParts returns it. That string cannot be turned into a map without losing the field restriction: the DuckDB dialect rebuilds a partly readable STRUCT with struct_pack, so its expressions and its columns do not correspond one to one.


Source​

Source = { kind: "table"; table: string; } | { kind: "relation"; ordered?: boolean; sql: string; }

Defined in: data-mate/src/teal-frame/interfaces.ts:57

Where a frame's rows come from.

Union Members​

Type Literal​

{ kind: "table"; table: string; }


Type Literal​

{ kind: "relation"; ordered?: boolean; sql: string; }

ordered means the relation's rows come out in a defined order: it ends in an ORDER BY, or derives from one through an operator that preserves order. join and an aggregating select use it to refuse to discard that order silently; see orderBy. A table is never ordered, because nothing may rely on a table's row order.