Skip to main content

Function: defineSchema()

Function: defineSchema()

function defineSchema<TTables>(builder: (context: SchemaBuilderContext) => TTables, options?: DefineSchemaOptions): Schema<Extract<keyof TTables, string>>;

Compile one declared schema. The returned type keeps the table names the builder returned, so api.tables and hooks can name only real tables.

Type Parameters

Type Parameter
TTables extends Record<string, AppKitTable>

Parameters

ParameterType
builder(context: SchemaBuilderContext) => TTables
options?DefineSchemaOptions

Returns

Schema<Extract<keyof TTables, string>>

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs