This program aims to transfer data from Microsoft Access databases to a different SQL database. Special config files with database and table information are read to determine what/where/how tables and columns are transferred. The program relies on ODBC drivers and aioodbc and pyodbc to connect to both source and target databases For now, ODBC drivers will have to be installed manually. See below for useful links on intalling and using ODBC drivers.
โ Warning: This project is in very early stages and should not be used in production
- Transfer tables from one or more Access databases to one target database
- Define transfer specification in one config file
- GUI is work in progress
- Table schema not fully implemented
- Only works on Windows
- ODBC drivers for source and target databases
โ Warning: Currently drops any existing tables in the target database and creates new tables
- With the executable:
accex <path-to-config-file>
- If a config file is not specified, the program will find one in the current working directory with the
.accex
extension.
- If a config file is not specified, the program will find one in the current working directory with the
- With the executable:
- From source:
python -m accex <path-to-config-file>
+------------------+------------------------+-----------+ | Sources | +------------------+------------------------+-----------+ | Database | Driver | Version | +==================+========================+===========+ | Microsoft Access | Access Database Engine | 2010-2016 | +------------------+------------------------+-----------+
+------------+--------------------+---------+ | Targets | +------------+--------------------+---------+ | Database | Driver | Version | +============+====================+=========+ | PostgreSQL | PostgreSQL Unicode | 14^ | +------------+--------------------+---------+
- Choose whether to drop, insert, or join duplicate target tables per table
- GUI for creating config
- Recommend, download, and install ODBC drivers automatically based on selected databases
- https://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine_X64.exe
- https://www.connectionstrings.com/microsoft-access-accdb-odbc-driver/
- https://www.microsoft.com/en-us/download/details.aspx?id=13255
- https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/
- https://www.postgresql.org/ftp/odbc/versions/
Using poetry to manage modules is recommended.
- Install a supported version of python, such as with pyenv
pyenv install 3.11.6
pyenv local 3.11.6
to set the local python version
- Install
poetry
and configure poetry config virtualenvs.in-project true
- Install
- Create a virtual environment
poetry shell
will create one if it does not exist and activates itpoetry env info
(should display the correct python version, with path to local .venv)
- Install dependencies
poetry install
- To install with optional dependencies, use
poetry install --with group_1,group_2,...
- Groups can be found in
pyproject.toml
- To install with optional dependencies, use
Tests use pytest, pytest-cov and pytest-asyncio
poetry install --with test
to install test dependenciespoetry run pytest
WIP