DB Smart Import
/install db-smart-importer
DB Smart Importer
This skill provides a workflow for importing CSV and SQL dump files into MySQL, MariaDB, and SQLite databases with intelligent column mapping.
When to Use This Skill
- User needs to import CSV files into MySQL/MariaDB/SQLite
- User has a .sql dump file they want to execute
- Column names in source don't match destination (e.g., "email address" → "email")
- User wants automated mapping suggestions based on patterns
- Data migration between database tables
NEVER Do
- NEVER import directly without reviewing the suggested mappings first
- NEVER assume column types match — verify before import
- NEVER skip backing up the database before bulk imports
Workflow
Step 1: Analyze Source and Destination
Use analyze_schema.py to extract schema information from your source (CSV/SQL dump) and destination database.
Examples:
# Analyze CSV file
python scripts/analyze_schema.py csv /path/to/data.csv
# Analyze SQL dump file
python scripts/analyze_schema.py sql /path/to/dump.sql
# Analyze SQLite database
python scripts/analyze_schema.py sqlite /path/to/database.db
# Analyze MySQL/MariaDB database (requires mysql-connector-python)
python scripts/analyze_schema.py mysql localhost --user root --password secret --database mydb
Step 2: Get Column Mapping Suggestions
Once you have analyzed both source and destination, use map_columns.py to get mapping suggestions:
python scripts/map_columns.py '["account name", "email address"]' '["client", "email"]'
Step 3: Execute Import
After confirming mappings, use execute_import.py:
CSV Import to SQLite:
python scripts/execute_import.py csv /path/to/data.csv --db-type sqlite --db-path /path/db.db --table clients --mapping '{"email": "email", "name": "client"}'
CSV Import to MySQL/MariaDB:
python scripts/execute_import.py csv /path/to/data.csv --db-type mysql --host localhost --user root --password secret --database mydb --table clients --mapping '{"email": "email", "name": "client"}'
Execute SQL Dump:
# To SQLite
python scripts/execute_import.py sql /path/to/dump.sql --db-type sqlite --db-path /path/db.db
# To MySQL/MariaDB
python scripts/execute_import.py sql /path/to/dump.sql --db-type mysql --host localhost --user root --password secret --database mydb
Script Reference
| Script | Purpose |
|---|---|
| analyze_schema.py | Extract schema from MySQL/MariaDB/SQLite, parse SQL dumps, or sample CSV data |
| map_columns.py | Suggest column mappings using fuzzy pattern matching |
| execute_import.py | Import CSV into databases or execute SQL dump files |
Tips
- The mapper uses fuzzy matching: "phone" ≈ "contact_number" ≈ "phone_number"
- Providing sample data improves mapping accuracy
- Always review mappings before executing — automated suggestions aren't perfect
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install db-smart-importer - After installation, invoke the skill by name or use
/db-smart-importer - Provide required inputs per the skill's parameter spec and get structured output
What is DB Smart Import?
Intelligent database import from .csv and .sql dumps into MySQL, MariaDB, and SQLite. Analyzes schemas, parses SQL dumps, suggests column mappings based on c... It is an AI Agent Skill for Claude Code / OpenClaw, with 96 downloads so far.
How do I install DB Smart Import?
Run "/install db-smart-importer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is DB Smart Import free?
Yes, DB Smart Import is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does DB Smart Import support?
DB Smart Import is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created DB Smart Import?
It is built and maintained by jarbcs1-prog (@jarbcs1-prog); the current version is v1.0.0.