type SavedQuerySource =
| {
readonly kind: "csv";
readonly sourceId: string;
readonly locator?: string;
readonly columns: readonly QueryColumnSpec[];
readonly delimiter?: number;
readonly headers?: boolean;
readonly emptyIsNull?: boolean;
}
| {
readonly kind: "json";
readonly sourceId: string;
readonly locator?: string;
readonly columns: readonly QueryColumnSpec[];
// … 7 more lines — see the API reference
}typeSavedQuerySource=|{readonlykind:"csv";readonlysourceId:string;readonlylocator?:string;readonlycolumns:readonlyQueryColumnSpec[];readonlydelimiter?:number;readonlyheaders?:boolean;readonlyemptyIsNull?:boolean;}|{readonlykind:"json";readonlysourceId:string;readonlylocator?:string;readonlycolumns:readonlyQueryColumnSpec[];// … 7 more lines — see the API reference}typeSavedQuerySource=|{readonlykind:"csv";readonlysourceId:string;readonlylocator?:string;readonlycolumns:readonlyQueryColumnSpec[];readonlydelimiter?:number;readonlyheaders?:boolean;readonlyemptyIsNull?:boolean;}|{readonlykind:"json";readonlysourceId:string;readonlylocator?:string;readonlycolumns:readonlyQueryColumnSpec[];readonlypath?:readonlystring[];}|{readonlykind:"host";// … 3 more lines — see the API reference}Where a saved query reads its data. The host's fetch callback resolves sourceId to bytes or batches and applies any credentials itself. A locator is a public, credential-free address such as an https URL; it never holds tokens, signed parameters or passwords.API referencetype QueryStep =
| { readonly kind: "filter"; readonly predicate: QueryPredicate }
| { readonly kind: "select"; readonly columns: readonly string[] }
| {
readonly kind: "rename";
readonly columns: readonly (readonly [
id: string,
name: string,
])[];
}
| {
readonly kind: "changeType";
readonly column: string;
readonly type: QueryColumnType;
readonly onError: "error" | "null";
// … 27 more lines — see the API reference
}typeQueryStep=|{readonlykind:"filter";readonlypredicate:QueryPredicate}|{readonlykind:"select";readonlycolumns:readonlystring[]}|{readonlykind:"rename";readonlycolumns:readonly(readonly[id:string,name:string,])[];}|{readonlykind:"changeType";readonlycolumn:string;readonlytype:QueryColumnType;readonlyonError:"error"|"null";// … 27 more lines — see the API reference}typeQueryStep=|{readonlykind:"filter";readonlypredicate:QueryPredicate;}|{readonlykind:"select";readonlycolumns:readonlystring[];}|{readonlykind:"rename";readonlycolumns:readonly(readonly[id:string,name:string,])[];}|{readonlykind:"changeType";readonlycolumn:string;// … 30 more lines — see the API reference}Saved step order is execution order; each column reference is a stable identity. In a saved query, a join input is the ID of another saved query.API referenceinterface SavedQueryOutput {
readonly table: WorkbookTableId;
readonly tableName: string;
readonly anchor: CellAddress;
}interfaceSavedQueryOutput{readonlytable:WorkbookTableId;readonlytableName:string;readonlyanchor:CellAddress;}interfaceSavedQueryOutput{readonlytable:WorkbookTableId;readonlytableName:string;readonlyanchor:CellAddress;}The workbook table that holds a query's last refreshed values. Its top-left cell is anchor; the first row is the header row. The table cells are the saved result, so a workbook without the query engine still reads them.API reference