Skip to main content

Get statement results

Read the rows of a finished SQL statement into a data table, chunk by chunk.

Command in the Databricks toolkit · id ooa.databricks/fetch_results · 7 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Workspace address (URL)StringNoWorkspace address, e.g. https://adb-1234567890123456.7.azuredatabricks.net or https://dbc-a1b2c3d4-e5f6.cloud.databricks.com.
Statement IDStringYesId from Run SQL statement.
Maximum rowsNumberNo100000Most rows to bring back.
Access tokenCredentialNoDatabricks personal access token or OAuth token from the vault. Or leave it empty and choose a connection that signs in, which gets and renews the token.
Wait (seconds)NumberNo0How long to wait for a running statement to finish; 0 fails at once if it is still running.
Client IDStringNoApplication (client) id of a service principal, to sign in with OAuth instead of a personal access token (G6).
Client secretCredentialNoThe service principal's OAuth secret from the vault (G6).

Outputs​

OutputTypeWhat it is
tableTableResult rows.
row_countNumberNumber of rows in the table.
total_rowsNumberRows in the full result, which can be more than max_rows.