Skip to content
SegmentStream/ Docs

Loading documentation…

↑ ↓ to navigate  ↵ to open  Esc to close
Website Console
Section menu

segmentstream warehouse query

Run a read-only SQL query against the workspace data warehouse.

Usage

Command syntax
segmentstream warehouse query [OPTIONS]

Run a read-only SQL query against the workspace data warehouse.  SQL is sent unchanged in the warehouse's own dialect, currently BigQuery GoogleSQL; it is not translated. Only a single SELECT statement is allowed. Reference tables as DATASET.TABLE; they resolve to the workspace project. Queries bill at most 1 TiB by default; --max-bytes-billed lowers that limit and --dry-run reports the estimated bytes without running the query.  Examples: segmentstream warehouse query --sql 'SELECT COUNT(*) AS n FROM gold.orders' segmentstream warehouse query --file report.sql --output csv > report.csv segmentstream warehouse query --file - --dry-run < report.sql segmentstream warehouse query --query-id ID --page-token TOKEN

Options

--sql SQL
SQL text to run
--file FILE|-
Read SQL from a file or stdin
--query-id ID
Read results of an earlier query instead of running SQL
--page-token TOKEN
Read a later page of --query-id
--all
Fetch all remaining result pages
--page-size INTEGER RANGE
Rows per result page [default: 500; 1<=x<=1000]
--dry-run
Validate and estimate bytes without running
--max-bytes-billed SIZE
Lower the billing limit, e.g. 50GiB (bytes, KiB, MiB, GiB, TiB)
--timeout INTEGER RANGE
Seconds to wait for a running query before printing its ID [default: 3600; 1<=x<=21600]
--workspace UUID
Override the linked workspace
--output [table|json|csv]
[default: table]
--api-url URL
SegmentStream control-plane origin
--organization ORG-ID
Organization for this command
--help
Show this message and exit.