sqlglotsql

Use SQLGlot when an agent needs to parse, transform, or validate SQL before moving queries between different SQL engines or trusting generated SQL.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "sqlglotsql" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-742c2e1996265691cbcf58450da2f1169423b1d4051ccd1883c41ed9acca5bea. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/translate-and-validate-sql-across-dialects-with-sqlglot before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Use SQLGlot when an agent needs to parse, transform, or validate SQL before moving queries between different SQL engines or trusting generated SQL.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Python 3.8+, SQLGlot, and any agent or script that needs SQL parsing, transpilation, or validation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "使用 SQLGlot 在不同方言间转换和验证 SQL"
slug: "translate-and-validate-sql-across-dialects-with-sqlglot"
version: "1.0.0"
displayName: "使用 SQLGlot 在不同方言间转换和验证 SQL"
summary: "当代理需要在不同引擎间转移查询或信任生成的SQL之前解析、转换或验证SQL时,请使用SQLGlot。"
license: "MIT"
description: "当代理需要在不同引擎间移动查询或信任生成的SQL之前解析、转换或验证SQL时,请使用SQLGlot。"
github_stars: 9133
verification: "security_reviewed"
source: "https://github.com/1991513ccie-png/skills"
author: "1991513ccie-png"
publisher_type: "individual"
category: "Data Extraction & Transformation"
framework: "Multi-Framework"
tool_ecosystem:
  github_repo: "1991513ccie-png/skills"
  github_stars: 9133

使用 SQLGlot 在不同方言间转换和验证 SQL

Use SQLGlot when an agent needs to parse, transpile, or sanity-check SQL before moving queries between engines or trusting generated SQL.

Prerequisites

Python 3.8+, SQLGlot, and any agent or script that needs SQL parsing, transpilation, or validation.

Installation

Use the upstream install or setup path that matches your environment:

  • Optionally prefix with UV=1 to use uv for the installation

  • make install
  • make install-dev
  • make docs-serve

Requirements and caveats from upstream:

  • It is a very comprehensive generic SQL parser with a robust test suite. It is also quite performant, while being written purely in Python.
  • Pure python version

  • Like parsing, generating SQL also requires the target dialect to be specified, otherwise the SQLGlot dialect will be used by default. For example, to transpile a query from Spark SQL to DuckDB, do parse_one(sql, diale...

Basic usage or getting-started notes:

Documentation

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供跨数据库 SQL 方言转换与验证能力,解决数据迁移中的核心痛点
  • 适用于数据工程师、分析师等高频刚需场景
Trigger Precision85/100

Highlights

  • 触发描述清晰明确,覆盖跨引擎查询迁移和 SQL 验证场景
Structure and Standards65/100

Areas to improve

  • 缺少端到端示例 Reported severity: Minor

    文档未提供具体的 SQL 转换示例和完整执行流程

    Recommendation: 补充一个从 Spark SQL 到 DuckDB 的完整转换示例,包括输入、输出和关键参数说明

  • 步骤划分不清晰 Reported severity: Minor

    Installation 和 Basic usage 部分缺乏明确的 Phase/步骤划分

    Recommendation: 将安装和使用流程划分为清晰的 Phase,如 Phase 1: 环境准备, Phase 2: 安装 SQLGlot, Phase 3: 执行转换等

Highlights

  • 文档结构基本完整,包含 Prerequisites、Installation、Documentation 等必要章节
Execution Reliability60/100

Areas to improve

  • 异常处理覆盖不足 Reported severity: Major

    未覆盖网络安装失败、版本冲突、SQL 语法错误等主要异常场景

    Recommendation: 增加异常处理说明,如网络超时重试机制、版本兼容性检查、SQL 语法错误捕获和处理

  • 不可逆操作无确认机制 Reported severity: Major

    SQL 转换可能影响生产环境,但文档未提及任何确认或备份机制

    Recommendation: 建议在执行转换前添加确认提示,并推荐先备份原始 SQL 或在测试环境验证

Highlights

  • 依赖 SQLGlot 官方库,来源明确且经过安全审核
Evidence Verifiability (mean of the first four)74/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • raw.githubusercontent.com
  • sqlglot.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Python 3.8+, SQLGlot, and any agent or script that needs SQL parsing, transpilation, or validation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.