Skip to main content

perpetual query

Run and check Hamelin queries.

perpetual query check​

Check that a Hamelin query is valid.

perpetual query check [flags]

Changes: Stages nothing.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Flags​

FlagTypeRequiredDescription
--querystringOptionalHamelin query (or use --file).
--filestringOptionalRead the query from this file; - reads stdin.
--spacestringOptionalSpace (SPC_*) for unqualified dataset names; default PERPETUAL_SPACE_ID, then space_id in .perpetual.toml.
--schema-idstringOptionalAlso check the query's output against this schema (SCH_*).

Also accepts the global flags, including the sign-in flags.

perpetual query run​

Run a Hamelin query and stream its rows.

perpetual query run [flags]

Changes: Stages nothing.

Output: Prints raw output.

Flags​

FlagTypeRequiredDescription
--formatstringOptionalRow format: ndjson, csv, json or text (default: text on a terminal, ndjson when piped; json and text hold every row in memory). One of ndjson, csv, json, text.
--querystringOptionalHamelin query (or use --file).
--filestringOptionalRead the query from this file; - reads stdin.
--spacestringOptionalSpace (SPC_*) for unqualified dataset names; default PERPETUAL_SPACE_ID, then space_id in .perpetual.toml.
--startstringOptionalStart of the time range, ISO-8601 with a zone (with --end).
--endstringOptionalEnd of the time range, ISO-8601 with a zone (with --start).
--timeoutstringOptionalCancel the query after this long, e.g. 90s, 10m; at most 24h (default: no limit).
--allow-truncatedbooleanOptionalExit 0 when the server's row limit cut the result short (default: exit 1 with RESULTS_TRUNCATED).

Also accepts the global flags, including the sign-in flags.


Perpetual CLI 0.5.0