← 返回
数据分析 中文

plydb

Skill for using the PlyDB CLI to perform SQL analysis of connected data sources. Use for SQL queries across heterogeneous databases and files such as Postgre...
用于通过 PlyDB CLI 对已连接的数据源执行 SQL 分析的技能,支持跨异构数据库和文件(如 PostgreSQL)进行查询。
ypt
数据分析 clawhub v1.0.0 1 版本 99801.6 Key: 无需
★ 0
Stars
📥 503
下载
💾 7
安装
1
版本
#latest

概述

PlyDB CLI skill

The plydb CLI can be used to query across heterogenous data sources.

Dependencies

The plydb binary must be available on the system.

If it is not, installation instructions can be found

here

Instructions

Configure data sources

First, the data sources to make available to PlyDB must be configured in a

config file as per the specification in references\config_schema.md.

Query with SQL

Once you have a data source config file, PlyDB can query across all of the

configured data sources. Use fully qualified table names: catalog.schema.table.

plydb query \
  --config path/to/config/file/config.json \
  "SELECT * FROM customers.default.customers c
   JOIN orders.default.orders o
   ON c.id = o.customer_id"

Fetching semantic context of the data

To provide context to understand the domain and write correct SQL - PlyDB can

build and provide semantic context from database COMMENT metadata alongside

column types and foreign keys as structured YAML that follows the

Open Semantic Interchange (OSI)

specification.

plydb semantic-context --config path/to/config/file/config.json

Enriching auto-scanned context with overlays

When the database lacks comments or you need to add relationships and metrics

not captured from source metadata, use --semantic-context-overlay to supply

one or more OSI YAML files that are merged on top of the auto-scanned model:

plydb semantic-context \
  --config path/to/config/file/config.json \
  --semantic-context-overlay path/to/overlay.yaml

The flag is repeatable; overlays are applied in the order given:

plydb semantic-context \
  --config path/to/config/file/config.json \
  --semantic-context-overlay base_overlay.yaml \
  --semantic-context-overlay team_overlay.yaml

Overlay files must be valid

Open Semantic Interchange (OSI)

YAML.

Overlays can add descriptions to existing datasets and fields, define

relationships between existing datasets, and add or update metrics. They cannot

introduce new datasets or fields - only enrich what was already discovered by

the auto-scanner.

Good opportunities to create or edit an overlay file are when encountering a new

dataset or after a session of data analysis with the user. These are great

opportunities to distill your learnings about the data's semantics and record

them into an overlay file for future sessions. Ask the user first.

Embedding overlays in the config file

Overlays can also be specified in the config file under

semantic_context.overlays instead of (or in addition to) the CLI flag:

{
  "databases": { ... },
  "semantic_context": {
    "overlays": [
      "path/to/base_overlay.yaml",
      "path/to/team_overlay.yaml"
    ]
  }
}

With overlays in the config, no extra flags are needed:

plydb semantic-context --config path/to/config.json

Config-file overlays are applied before any --semantic-context-overlay flags.

Troubleshooting

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 05:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,040
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,936
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,312