holistics/anfra-skills

anfra-run-aql

Run an AQL query against a dataset and return its result rows (or compile it to SQL).

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/holistics/anfra-skills --skill anfra-run-aql

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Running AQL

Command (swappable per scenario)

Default (Anfra) — compile and run against a dataset:

sh
anfra query --dataset <uname> '<query>'
# or
cat query.aql | anfra query --dataset <uname>

# the compiled SQL, without running it
anfra query compile --dataset <uname> '<query>'

An invalid query fails (exit 1) and prints its diagnostics; fix it with [](../anfra-validate-aql/).

How many rows come back

anfra query (and the MCP query tool) answers one page: the first 10,000 rows, or --page-size rows of --page. has_more: true means rows were left out, so read it before treating a result as complete, and never report a count, a sum or "all rows" from a page that has more.

This cap is the command's, not the data's or anfra's: a Data App's query gets every row unless it declares a pageSize, and anfra query export writes the whole result to a file. To answer a question, ask the query for what you need (aggregate, filter, limit:) rather than fetching rows to count them.

Replace this command for other runtimes if needed.

Writing correct queries

Use [](../anfra-aql/) (syntax, functions, gotchas) and [](../anfra-write-aql/) (workflow) to write the query, and [](../anfra-validate-aql/) to type-check it before running.


anfra skills 0.21.0

来自同一仓库

更多 Skills

全部 Skills