Amazon Redshift SQL 实践

原名:redshift-guide

按 Redshift 特性编写 DDL、COPY、UNLOAD、系统查询和性能优化方案。

中文 Skills 技能说明

适合避免把 PostgreSQL 用法直接套到 Redshift;先确认表结构、分布、排序和真实执行计划。AWS 开源技能文本可在中国境内本地使用;实际调用云服务须使用用户自己的合法 AWS 账户和权限,并确认目标服务在 AWS 中国区域或所选区域的可用性、运营主体、网络、备案、费用、数据位置和跨境要求。CEOFans 不提供第三方账号、密钥或网络绕过。执行前读取真实账户、区域、项目和官方资料,输出目标、依据、影响、费用、验证结果与回退方式;没有证据时明确说明未知,不编造配置、数据或成功状态。 创建、修改、部署、发送、迁移、删除或产生费用的操作,必须先展示目标和差异并获得有权限人员确认。 代码、数据库、日志、凭据、客户和企业资料按敏感内容处理,只读取任务所需范围,上传或外发前完成授权、脱敏和最小化。

上游能力依据

上游原始适用说明:Amazon Redshift is NOT PostgreSQL — corrects PostgreSQL-derived LLM mistakes; covers Redshift-specific SQL, DDL, COPY/UNLOAD, system views, metadata discovery, and operational patterns. Applies ONLY when the task is about Redshift itself (cluster, Serverless workgroup, or Redshift SQL). Pushes back on: CREATE INDEX, stringagg, pgcatalog, text type, SERIAL, stlquery, LATERAL, RETURNING. Triggers on: Redshift SQL, Redshift CREATE TABLE, Redshift COPY/UNLOAD, slow Redshift query, Redshift permission denied, Redshift disk full, Redshift system views, QUALIFY, PIVOT, MERGE, Redshift Data API, Redshift WLM, concurrency scaling, Redshift resize, Redshift Spectrum external tables. Does NOT apply to (defer to that service's own skill): Amazon S3 storage/bucket policies, Athena or Glue queries/catalogs, data-lake or Iceberg work outside Redshift, Aurora, RDS, or DynamoDB — but S3/Glue ARE in scope for Redshift COPY, UNLOAD, or data-lake queries (external schemas/tables on S3).

上游 SKILL.md 主要章节(保留原文标题):

使用边界

先确认数据口径、只读或写入权限以及备份方案。查询结果需要说明范围,任何结构或数据变更都应先预览并人工确认。

作者、翻译与许可证

原作者
Amazon Web Services 与 agent-toolkit-for-aws contributors
中文翻译
CEOFans翻译
许可证
Apache-2.0
上游来源
https://github.com/aws/agent-toolkit-for-aws/tree/62ad0e6cd3dc9950fa8b18ab7c1b783761dc77d2/skills/specialized-skills/analytics-skills/redshift-guide

适用范围

平台:linux、macos、windows;标签:数据与数据库、Amazon Redshift SQL 实践、AWS

安全提示

基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。

如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。