csv-to-normalized-db-migration

Community

Migrate flat CSV data into a normalized DB.

AuthorHugoAlmeidaMoreira
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured workflow to migrate flat or wide CSV data (including clinical datasets) into a normalized PostgreSQL schema using an EAV + event-sourcing model, covering column mapping, ontology alignment, value normalization, and SQL generation to support auditable migrations.

Core Features & Use Cases

  • Extract CSV columns and sample rows to understand structure and data quality.
  • Map CSV columns to ontology variables and event types, generating deterministic IDs and ensuring idempotent SQL.
  • Normalize values, handle missing data, and generate the necessary inserts for patients, events, and values.
  • Support deriving indicators and creating views to compute derived metrics after migration.

Quick Start

Run the provided migrate_csv.py against your data.csv to generate the migration SQL and apply it to your PostgreSQL database.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: csv-to-normalized-db-migration
Download link: https://github.com/HugoAlmeidaMoreira/zeus-agent/archive/main.zip#csv-to-normalized-db-migration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.