Skip to content

SDK API Reference / SDKQueryOptions

Interface: SDKQueryOptions

SDK Query options

These options match CLI command options, allowing SDK to be used programmatically with the same flexibility as the CLI.

Properties

catalog?

optional catalog: string

Trino catalog

Default

ts
'td'

onJobId()?

optional onJobId: (jobId) => void

Callback when job ID is received Used by CLI to update progress indicator

Parameters

jobId

string

Returns

void


onProgress()?

optional onProgress: (stats) => void

Callback for progress updates Used by CLI to show query state, processed rows, and split progress

Parameters

stats
completedSplits

number

processedRows

number

state

string

totalSplits

number

Returns

void


schema?

optional schema: string

Database name (Trino schema) Maps to --database option in CLI


signal?

optional signal: AbortSignal

Abort signal for cancellation


timeout?

optional timeout: number

Query timeout in milliseconds Maps to --timeout option in CLI