Skip to content
Queria Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

CLI

Queria CLI commands, and output and authentication settings

Commands

Command Purpose
queria list List datasets
queria search <keyword> Keyword search across datasets, tables, and columns
queria info <dataset> Dataset metadata (license, source, etc.)
queria schema <dataset> List a dataset’s tables
queria columns <dataset> [table] List columns (narrowed down when a table is given)
queria summarize <table> Column statistics for a table (full scan)
queria sql "<query>" Run SQL
queria docs list List this documentation’s pages
queria docs show <name> Print one documentation page in the terminal
queria skills list / show <name> List and print the published agent skills
queria skills install [name] Install the agent skills into this project or machine
queria login / logout Sign in with browser approval / delete the saved token
queria auth set-token / status / clear Manage API tokens (relaxed rate limits)
queria create / edit / delete Register one of your own datasets, change its visibility, or delete it
queria validate Check your own dataset’s declarations against your local data
queria compile Write dataset.json from the declarations and your local data
queria telemetry status / disable / enable Manage anonymous usage telemetry
queria feedback send / status Send a request or a problem report

Output formats

Choose the standard output format with --format.

  • table (default): a table laid out for reading in the terminal
  • csv: CSV with a header row
  • json: a JSON array of rows
  • jsonl: one JSON record per line, for passing to other commands line by line
  • markdown: a Markdown table, for pasting into docs and articles
queria list --format json | jq '.[].datasource'

In table, newlines inside a value become spaces. A value too wide for the terminal wraps onto more lines and is not cut off. Set a width with COLUMNS=200 queria ... to change where it wraps. Piped or redirected output is not wrapped and stays on one line per row.

Save to a file

Add --out to save the results to a file. The extension determines the format (.parquet / .csv / .json / .jsonl). Save large results with --out rather than printing them.

queria sql "SELECT * FROM e_stat.ssds.a_pref_population" --out pop.parquet

Automatic dataset ATTACH

When your sql names <dataset>.<schema>.<table>, the CLI attaches that dataset for you. When the SQL doesn’t name the dataset, as when you read information_schema, name it with --datasets.

queria sql "SELECT * FROM information_schema.tables WHERE table_catalog = 'jma'" --datasets jma

When two accounts publish the same dataset name, write the handle as well: --datasets alice/sales. The name you use in SQL is still the short one (sales.main.…). To use both in one query, name them with as: --datasets "alice/sales as a,bob/sales as b". To read your own private datasets, run queria login first or put a token in QUERIA_TOKEN.

API tokens

Public data on data.queria.io can be read without a token. Reading without a token has rate limits, and registering a token raises them. You also need a token to read your own private datasets.

On your own computer, use queria login. When you approve in the browser, a token is issued and saved. Signing in again on the same computer replaces the token previously issued on that computer. Each computer you signed in on appears as “CLI (computer name)” under “Connected apps and devices” on the API tokens page, where “Disconnect” disables its token.

queria login

Where you can’t approve in a browser, such as CI and BI tools, issue a token at queria.io/settings/tokens and pass it with queria auth set-token <token> or the QUERIA_TOKEN environment variable. See Authentication for details.

Feedback

From the terminal, queria feedback send sends dataset requests, data problems, and documentation errors. The full text of what will be sent is shown before it goes. See Telemetry for details.

queria feedback send "I need childcare waiting-list counts by municipality" --kind dataset_request

Bug reports and feature requests are also welcome as issues.

Was this page helpful?