360 Secure SkillHub
360 安全技能中心

CSV to Postgres Migrator / CSV到Postgres迁移器

面向 CSV 到 PostgreSQL 的数据迁移 Skill:自动识别 CSV 字段类型并匹配 PostgreSQL 列类型,生成带索引与约束的建表脚本,以流式方式批量导入大量数据,导入前清洗脏数据并跳过或记录错误行。仓库仅含 SKILL.md,没有实际脚本实现;增量 upsert 与字段映射等标注为 Pro 功能。

kingaiwork
kingaiwork
热度 9.67
最近更新 2026-07-08 09:00:31
分类:数据依赖:代码执行 / 读写文件 / 第三方 API应用场景:数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add csv-to-postgres-migrator
Metadata
name
csv-to-postgres-migrator
description
Infer schema from CSV headers and data, create tables, and bulk-import with error handling. / 从CSV头部和数据推断模式,创建表并批量导入,含错误处理。
version
1.0.0
topics
["data-migration","csv","postgresql","schema-inference","数据迁移","数据库导入"]
metadata
{"openclaw":{"requires":{"bins":["bash","curl"]},"emoji":"📊","homepage":"https://kingai.work/","install":[]}}

📊 CSV to Postgres Migrator / CSV到Postgres迁移器

Infer schema from CSV headers and data, create tables, and bulk-import with error handling. / 从CSV头部和数据推断模式,创建表并批量导入,含错误处理。

🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work


Who This Is For / 适用人群

• Marketing team needs to sync weekly email campaign CSV exports into a Postgres reporting table / 市场团队每周需将CSV导出的邮件活动数据导入Postgres报表库;自动建表并清理重复数据,直接用于分析 • Developer migrates legacy system data from a CSV dump to a new Postgres microservice / 开发者将遗留系统的CSV数据迁移至新Postgres微服务;一键推断类型并创建表,大幅缩短迁移周期 • Data analyst merges multiple CSV exports from different sources into a unified Postgres warehouse / 数据分析师合并多个来源的CSV导出文件;批量导入并自动处理字段差异,快速搭建统一数据仓库

Core Capabilities / 核心能力

• Automatically detect data types from CSV content and suggest optimal PostgreSQL column types / 智能识别CSV字段类型,自动匹配最佳PostgreSQL列类型,无需手动定义 • Handle large CSV files with streaming bulk import, processing millions of rows without memory overflow / 海量CSV流式导入,百万级数据高效处理,内存占用极低 • Generate table creation scripts with proper indexes, constraints, and foreign key hints / 自动生成带索引与约束的表创建脚本,数据库结构一目了然 • Validate and clean malformed rows before import, skip or log errors gracefully / 导入前自动清洗脏数据,错误行智能跳过并记录日志,数据完整无忧 • Support incremental updates and upsert logic for merging new CSV data with existing tables (Pro) / 支持增量更新与合并逻辑,新老数据自动比对,避免重复 (Pro) • Customize schema mapping, rename columns, and apply transformation rules via interactive config (Pro) / 自定义字段映射与转换规则,灵活适配复杂业务场景,一键迁移 (Pro)

Try It Now / 立即体验

csv2pg import sales_data.csv --db postgres://user:pass@localhost:5432/mydb --table sales Automatically creates the table "sales" with inferred schema and imports all CSV rows / 自动创建"sales"表并导入全部数据,省去手动建表步骤 

Feature Comparison / 功能对比

Free Pro
Core / 核心 ✅ ✅
Batch / 批量 — ✅
AI / AI 增强 — ✅
SLA / 支持 Community Priority

• Unlock upsert logic to keep your tables clean with zero duplicates / 开启合并更新模式,数据永无重复,维护成本降至最低 • Access interactive schema editor for custom column mapping and transformation / 获得可视化模式编辑器,灵活调整字段映射,应对复杂迁移需求 • Priority support and faster bulk import for enterprise-grade datasets / 享受优先技术支持与企业级高速导入,大型数据集也能秒级完成\n\n

KingAI.Work — 智能进化|vip@kingai.work