coral
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCoral CLI Skill
Coral CLI Skill
Use this skill to answer data questions by querying connected sources with .
coral sql使用该Skill通过查询已连接的数据源来解答数据相关问题。
coral sqlDiscovery-First Workflow
探索优先工作流
Before writing any query, follow these steps:
- List available tables:
sql
SELECT schema_name, table_name, description, required_filters, guide FROM coral.tables;-
Read thecolumn — it contains per-table query patterns and gotchas. Use it.
guide -
Check required filters for the table you want to query. Queries against tables with required filters will fail without the corresponding WHERE clauses.
sql
SELECT column_name, data_type, is_required_filter, is_virtual, description
FROM coral.columns
WHERE schema_name = '<source>' AND table_name = '<table>'
ORDER BY ordinal_position;- Inspect source inputs when config affects the query or answer. This matters when you need source-specific values such as Datadog's or Sentry's
DD_SITEto build absolute links, explain account scope, or debug missing configuration.SENTRY_ORG
sql
SELECT key, kind, value, default_value, hint, required, is_set
FROM coral.inputs
WHERE schema_name = '<source>'
ORDER BY key;- Then query:
bash
coral sql "SELECT <columns> FROM <source>.<table> WHERE <required_filters> LIMIT 10"在编写任何查询之前,请遵循以下步骤:
- 列出可用表:
sql
SELECT schema_name, table_name, description, required_filters, guide FROM coral.tables;-
阅读列 — 其中包含每个表的查询模式和注意事项,请务必使用。
guide -
检查目标表的必填过滤器。如果查询带有必填过滤器的表时未添加对应的WHERE子句,查询将失败。
sql
SELECT column_name, data_type, is_required_filter, is_virtual, description
FROM coral.columns
WHERE schema_name = '<source>' AND table_name = '<table>'
ORDER BY ordinal_position;- 当配置影响查询或结果时,检查源输入。当你需要特定于数据源的值(如Datadog的或Sentry的
DD_SITE)来构建绝对链接、解释账户范围或调试缺失配置时,这一点至关重要。SENTRY_ORG
sql
SELECT key, kind, value, default_value, hint, required, is_set
FROM coral.inputs
WHERE schema_name = '<source>'
ORDER BY key;- 然后执行查询:
bash
coral sql "SELECT <columns> FROM <source>.<table> WHERE <required_filters> LIMIT 10"Query Guidance
查询指南
- Virtual columns: Filter-only columns accepted in WHERE clauses but returning NULL in results. Check in
is_virtual.coral.columns - : Use it to inspect per-source variables and secrets before making assumptions about URLs, org names, regions, or other source config. Secret rows always return
coral.inputs; usevalue = NULLto confirm whether a secret is configured.is_set - Cross-source joins: Standard SQL JOINs work across source schemas. Cross-source joins execute in memory after source scans complete.
- 虚拟列: 仅可在WHERE子句中用于过滤,但在结果中返回NULL的列。请查看中的
coral.columns字段。is_virtual - : 在假设URL、组织名称、区域或其他源配置之前,使用它检查每个数据源的变量和密钥。密钥行始终返回
coral.inputs;请使用value = NULL确认密钥是否已配置。is_set - 跨源连接: 标准SQL JOIN可跨源模式使用。跨源连接会在源扫描完成后在内存中执行。