Function: useStatementFetch()
useStatementFetch(
statementId):ByIdFetchState<{columns:string[];rowCount:number;rows:Record<string,unknown>[];truncated:boolean; }>
Fetch the rows of a Databricks statement by id from the Mastra
plugin’s generic /embed/data/:id endpoint via
MastraPluginClient.statement. Used by the chat UI to resolve
[data:<statement_id>] markers the agent embeds in prose.
Server-side, the route reuses the get_statement tool’s fetch +
coercion pipeline so the shape matches what the LLM saw for the same
statement; data.truncated signals the server clipped to its row
cap. Cached for the tab’s lifetime because a statement_id
materializes the same rows forever.
Parameters
Section titled “Parameters”statementId
Section titled “statementId”string | undefined
Returns
Section titled “Returns”ByIdFetchState<{ columns: string[]; rowCount: number; rows: Record<string, unknown>[]; truncated: boolean; }>