A robust tool for downloading, migrating, and managing the NHTSA's Vehicle Product Information Catalog (vPIC) database across different database platforms (SQL Server, PostgreSQL, and SQLite).
This tool facilitates the migration of the NHTSA's vPIC database, which contains comprehensive vehicle specification data, including:
- Vehicle Makes, Models, and Types
- Manufacturer Information
- Vehicle Specifications and Features
- WMI (World Manufacturer Identifier) Data
- VIN Decoder implementation
- 🚀 Automated download of the latest vPIC database backup
- 🔄 Migration support for multiple database platforms:
- Microsoft SQL Server
- PostgreSQL
- SQLite
- ✅ Data integrity verification
- 📊 Progress tracking with detailed logging
- 🔧 Configurable settings and type mappings
- 🐳 Docker support for easy deployment
- Python 3.8 or higher
- Docker and Docker Compose
- Make (optional, but recommended)
- Clone the repository:
git clone https://github.com/samsullivandelgobbo/vPIC-dl.git
cd vpic-migration
- Install dependencies:
./install_deps.sh
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
- Start the containers:
make start-containers
- Run the migration:
make download
make restore
make migrate-pg
make migrate-sqlite
make verify-pg
make backup
or
make all
The simplest way to use the tool is through the provided Makefile commands:
make all
make download
make restore
make migrate-pg
make migrate-sqlite
make verify
make backup
Configuration can be modified through environment variables or by editing vpic_migration/settings.py:
SQL_SERVER = {
"driver": "ODBC Driver 18 for SQL Server",
"server": "localhost",
"database": "vpic",
"user": "SA",
"password": "YourPassword",
"trust_cert": "yes"
}
The vPIC database contains numerous tables with vehicle-related information. Key tables include:
- Make: Vehicle manufacturers
- Model: Vehicle models
- VehicleType: Types of vehicles
- WMI: World Manufacturer Identifier information
- And many more...
For complete schema information, see DATA_STRUCTURE.md.