Skip to content
EximAgent Docs

Full-corpus analytics

Push the computation down with analytics query and sql, walk the market verbs, and export large result sets to disk instead of into context.

When a question does not fit a signal verb, push the computation down to the server rather than pulling rows up into context.

Read the schema first

eximagent analytics catalog

This reports the dimensions and measures available. Composing a query without it is guesswork.

Structured queries

eximagent analytics query \
  --groupBy importer \
  --measures shipments \
  --filters '{"hs6":"090111","dest":"DE"}'

analytics query aggregates server-side over the full corpus and returns a small result. This is almost always what "analyse the whole database" actually needs.

Guarded SQL

eximagent analytics sql --query_sql "SELECT ..."

Read-only SELECT against the trade corpus, for questions the structured shape cannot express.

Market movement

eximagent market trend --hs6 090111 --dest DE
eximagent market momentum --hs6 090111 --dest DE
eximagent market growth --hs6 090111 --dest DE
eximagent market entrants --hs6 090111 --dest DE
eximagent market churned --hs6 090111 --dest DE
eximagent market compare --hs6 090111 --dest DE
eximagent market anomalies --hs6 090111 --dest DE

entrants and churned are the two most actionable: who just started buying, and who just stopped. Both are outreach triggers.

Paging and export

Both analytics query and analytics sql page the full result set. Each full page returns a nextActions entry with the next-page cursor bound; follow it until empty.

For anything large, write it to disk instead:

eximagent analytics query \
  --groupBy importer --measures shipments \
  --out buyers.ndjson --format ndjson

The CLI auto-pages the entire result set at 10,000 rows per page and prints only a summary — row count, pages, columns, a three-row sample, and byte size.