Skip to main content
On this page

Kater CLI Build an analysis query

kater query draft

Read your draft of a workspace query as you left it, or as a new one would start, and what Save may do. Writes nothing.

A program gives the exact typed request with --request-file.

The request’s fields: wait_ms: For a script that calls the HTTP API: how long, in milliseconds, to wait for the result before answering. Left out or 0, the API answers pending at once. A kater command waits for the result without it. tab: The tab of the caller’s live stream that waits (tab=<id> on /live), so the tab’s Stop, as when its page closes, takes the wait off the read’s worker job, which then stops when it has not started on the warehouse. Left out, as a kater command sends it, the wait stays until its job ends. namespace (required): {kind?: “workspace”, scope: {kind?: “shared”, connection: text} or {kind?: “personal”, connection: text, user_id: text, topic?}, workspace: text}. The query’s workspace, or the figure’s, as its answer names it. document: {path: text, text?, revision?, version?, model?, selection?}. The query’s file. Left out with answer. answer: A figure’s pinned answer of its weeks in namespace, as its chart names it, which the caller can read: the draft is of the figure’s query, its Kater SQL, and its from: names the figure. Left out for a query, which document names. shared: A sent copy of a draft of this query that the caller can read, connections/<connection>/users/<email>/brainstorm/sent_<query name>.sql, as sandbox.draft.send answers it and the owner’s inbox row opens it in draft=. text is then the copy’s text. The copy is never changed: the caller’s own draft is still path. Only with document. chart: {spec: an object, mappings: a list of an object, plan?, formats?}. The chart as drawn, whose output mappings become the draft’s chart bindings.

Examples

Terminal window
# Read your draft of a workspace query as you left it, or as a new one would start, and what Save may do. Writes nothing
kater query draft

Arguments

ArgumentDescription
<object>The query, or the workspace of a figure whose answer --request-file names. A query: its key, such as duckdb_sample/shop/top_regions, or in a person’s folder, duckdb_sample/users/<user id>/shop/top_regions; as <workspace>/<name>, such as shop/top_regions; its workspace’s folder and its name, such as connections/<connection>/workspaces/shop/top_regions; or its id, rel1_…, also from before a rename. A workspace: its key, such as duckdb_sample/shop, or in a person’s folder, duckdb_sample/users/<user id>/shop; its name, such as shop; its folder, such as connections/<connection>/workspaces/shop; or its id, rel1_…, also from before a rename. Required unless --request-file is given.

Options

OptionDescription
--request-file <file>Typed request JSON file; - reads stdin.

It also takes the global options anywhere on the line, and --help.

See also