CLI reference¶
Every dh command, its summary and its flags. Generated from the CLI's own command tree, so it
cannot drift from the binary it documents. New here? Start with
the quickstart.
Global options¶
Accepted before or after the subcommand, on every command.
| Option | Purpose |
|---|---|
--profile |
Named profile to use. |
--host |
DuckHaven base URL. |
--workspace/-w |
Workspace slug or UUID. |
--catalog |
Catalog to resolve names in. |
--format |
json, table or csv. Defaults to a table on a terminal, JSON otherwise. |
--output |
Write the payload to a file instead of stdout. |
--quiet |
Suppress progress and warnings on stderr. |
--no-color |
Disable colour. NO_COLOR does the same. |
--debug |
Trace settings resolution on stderr. |
--version |
Print the dh version and exit. |
dh admin¶
Operator tasks: accounts, users, agents.
dh admin agent¶
Compute agents.
dh admin agent access¶
Who may use this agent, and how that was decided.
dh admin agent bootstrap¶
Mint a single-use token for an agent to register itself.
dh admin agent compute-options¶
The CPU and memory shapes this deployment will provision.
dh admin agent delete¶
Delete an agent registration.
dh admin agent disconnect¶
Force an agent's control channel closed. It may reconnect.
dh admin agent elastic-create¶
Provision an elastic agent. Accepted asynchronously; poll admin agent get.
dh admin agent get¶
One agent's registration, capabilities and lifecycle state.
dh admin agent list¶
Every agent, including ones this caller could not run queries on.
dh admin agent metrics¶
Current load and capacity for every agent.
dh admin agent monitoring¶
One agent's monitoring detail.
dh admin agent restart¶
Restart an elastic agent.
dh admin agent revoke-credential¶
Revoke an agent's credential, so it cannot reconnect.
dh admin agent terminate¶
Terminate an elastic agent.
dh admin maintenance¶
Deployment maintenance policy.
dh admin maintenance policy¶
The deployment's maintenance policy.
dh admin maintenance scan¶
Run a maintenance scan now rather than waiting for the schedule.
dh admin pat¶
Tokens issued to a service account.
dh admin pat issue¶
Issue a token for a service account. The secret is shown once.
dh admin pat list¶
Tokens issued to a service account: creation and expiry, never the secret.
dh admin pat revoke¶
Revoke one token. It stops authenticating immediately.
dh admin service-account¶
Machine identities for unattended callers.
dh admin service-account create¶
Create a service account.
dh admin service-account delete¶
Delete a service account.
dh admin service-account list¶
Service accounts and how many live tokens each holds.
dh admin service-account update¶
Change a service account's role, or disable it.
dh admin storage¶
Storage backends.
dh admin storage health¶
Check a backend end to end, by vending credentials against a probe table.
dh admin storage list¶
Configured storage backends.
dh admin user¶
People and their workspace roles.
dh admin user create¶
Create a local user. The password is prompted for rather than passed as a flag.
dh admin user list¶
People known to the deployment.
dh admin user remove-from-workspace¶
Remove a user from a workspace.
dh admin user revoke-sessions¶
Sign a user out everywhere. Their tokens are unaffected.
dh admin user set-workspace-role¶
Add a user to a workspace, or change the role they hold there.
dh admin user update¶
Change a user's global role, or deactivate them.
dh admin user workspaces¶
Which workspaces a user belongs to, and in what role.
dh agent¶
Compute agents you may run queries on.
dh agent list¶
The agents this caller may run queries on, with their capabilities. Distinct from dh admin agent
list, which needs agents:manage and shows every agent in the deployment; this is the list an
analyst can actually use, and where --agent <name> resolves a name from.
dh api¶
Call any endpoint directly.
dh api delete¶
Send a DELETE request.
dh api get¶
Send a GET request.
dh api patch¶
Send a PATCH request.
dh api post¶
Send a POST request.
dh api put¶
Send a PUT request.
dh auth¶
Sign in, and inspect the credential in use.
dh auth describe¶
Show which credential is in use and where each setting came from.
dh auth login¶
Sign in and store a personal access token.
dh auth logout¶
Forget the stored token, keeping the rest of the profile.
dh auth revoke¶
Revoke one of your own tokens, by the id dh auth tokens shows.
dh auth status¶
Who the stored credential authenticates as, and how long it has left.
dh auth tokens¶
Your own tokens: when each was issued, when it expires, which is in use.
dh catalog¶
Catalogs attached to a workspace.
dh catalog attach¶
Attach an existing catalog to the workspace.
dh catalog create¶
Create a catalog and attach it to the workspace.
dh catalog detach¶
Detach a catalog from the workspace. The catalog itself survives.
dh catalog drop¶
Drop a catalog outright, by id. Destructive.
dh catalog list¶
Catalogs attached to the workspace.
dh catalog refresh-stats¶
Recompute table statistics across the catalog.
dh grant¶
Catalog access control.
dh grant access-mode¶
Switch the catalog between open and scoped access.
dh grant list¶
Who has what on the catalog, and in which access mode.
dh grant remove¶
Revoke one grant by its id, as shown by dh grant list.
dh grant set¶
Grant a principal access to the catalog, a schema, or one table.
dh health¶
Liveness, readiness, and the deployment's own health report.
dh lineage¶
Publish and retire lineage from other producers.
dh lineage import¶
Publish a producer's own artifact, translated by that producer's adapter.
dh lineage import-edges¶
Publish already-canonical edges from a producer with no adapter.
dh lineage purge¶
Remove every edge a retired producer asserted. Requires workspace owner.
dh profile¶
Inspect and edit local connection profiles.
dh profile list¶
List the configured profiles and which one is the default.
dh profile remove¶
Delete a profile and the token stored with it.
dh profile show¶
Show one profile. The token is reported as present, never printed.
dh profile use¶
Make a profile the default for subsequent commands.
dh query¶
Run SQL and inspect past runs.
dh query cancel¶
Ask the agent to stop a running query.
dh query get¶
One run's status, timings and error.
dh query list¶
The query log, newest first. Doubles as the audit trail.
--status
--statement-type
--since
--until
--origin
--session
--agent
--user
--search/-q
--slower-than
--sort
--dir
--all-workspaces
--limit
--all
dh query profile¶
The execution profile captured for a finished run, if there was one.
dh query rows¶
The results of a finished run, following the cursor to the end.
dh query run¶
Run SQL and print the results. The noun-first spelling of dh sql.
dh saved-query¶
Named SQL saved in the workspace.
dh saved-query create¶
Save SQL under a name, replacing any query already using that name.
dh saved-query delete¶
Delete a saved query.
dh saved-query list¶
The workspace's saved queries, newest first.
dh saved-query update¶
Change a saved query's name, SQL or default agent. Omitted fields are left alone.
dh schedule¶
Cron schedules for saved queries.
dh schedule create¶
Schedule a saved query to run on a cron expression.
dh schedule delete¶
Delete a schedule. The saved query it ran is left alone.
dh schedule list¶
The workspace's schedules.
dh schedule runs¶
Runs produced by a schedule, or by all of them.
dh schedule update¶
Change a schedule's cron, agent, or whether it runs at all.
dh schema¶
Schemas within a catalog.
dh schema create¶
Create a schema.
dh schema drop¶
Drop a schema.
dh schema list¶
Schemas in the catalog.
dh search¶
Find catalogs, schemas, tables and saved queries by name.
dh semantic¶
Publish and manage semantic models.
dh semantic deprecate¶
Retire a published model without deleting it.
dh semantic import¶
Publish semantic definitions from an external producer.
dh semantic model¶
Semantic models.
dh semantic model get¶
One model in full: datasets, dimensions, metrics and relationships.
dh semantic model list¶
The workspace's semantic models, published and draft.
dh semantic publish¶
Make a model authoritative to the assistant. Validates first.
dh semantic purge¶
Remove everything one provider published. Requires workspace owner.
dh semantic relationship¶
Joins between a model's datasets.
dh semantic relationship add¶
Declare a join between two of a model's datasets.
dh semantic relationship remove¶
Remove a relationship from a model.
dh semantic validate¶
Check a model without publishing it. Safe to run in CI.
dh session¶
Stateful SQL sessions, for dbt, dlt and the REPL.
dh session close¶
Close a session and release its connection.
dh session exec¶
Run one statement on an existing session's connection.
dh session get¶
One session's status and the agent holding it.
dh session list¶
The workspace's sessions, newest first. The audit list.
dh session open¶
Open a session and print its id.
dh session statements¶
A session's statements in execution order.
dh sql¶
Run SQL and print the results.
dh table¶
Tables, their metadata and a sample of rows.
dh table create¶
Create an Iceberg table.
dh table drop¶
Drop a table.
dh table get¶
One table's columns, partitioning and statistics.
dh table health¶
Maintenance findings for this table.
dh table lineage¶
What this table was built from.
dh table list¶
Tables in a schema.
dh table recount¶
Recount the table's rows and refresh its stats.
dh table sample¶
A page of rows, for previewing without SQL.
dh table snapshots¶
The table's Iceberg snapshots.
dh version¶
The CLI's version, and the server's when one is reachable.
dh workspace¶
Workspaces and their members.
dh workspace create¶
Create a workspace.
dh workspace delete¶
Delete a workspace.
dh workspace get¶
One workspace, by slug or id. Defaults to the configured one.
dh workspace list¶
Workspaces you can see.
dh workspace member¶
Workspace membership.
dh workspace member add¶
Add a member to the workspace.
dh workspace member list¶
Who belongs to the workspace, and in what role.
dh workspace update¶
Rename or re-describe a workspace.