Query cached results with SQL (DuckDB) — each asset is a named view

Usage: barca sql [OPTIONS] <QUERY> [FILES]...

Arguments:
  <QUERY>     The SQL query (DuckDB dialect); quote it as one argument
  [FILES]...  Python files or directories; default: discover the project

Options:
      --json            Emit JSON on stdout (the default when stdout is not a terminal)
      --pretty          Emit human-readable output (the default when stdout is a terminal)
  -l, --limit <LIMIT>   Maximum number of rows to return [default: 100]
      --all             Return every row (no limit)
      --env <ENV>       Use a separate cache and history for this environment
      --server [<URL>]  Use a server (URL or configured); get/run execute its deployed code
      --local           Use independent local state; ignore the configured server
  -h, --help            Show concise command help
      --examples        Show all command examples without running anything

Examples:
  barca sql "select * from revenue"                       # one view per asset, using its declared name or function fallback
  barca sql "select region, sum(amount) from orders group by 1"   # any DuckDB SQL over cached results
  barca sql "select * from orders o join revenue r using (region)" # join assets

All examples: barca sql --examples
More: barca docs sql
