A tool that enables bi-directional data synchronization between DBF (dBase) files and a SQL databases. It facilitates seamless data migration from DBF to SQL and vice versa.
- Check your Python version, we use
python = "^3.12"
:
python --version
- Clone the repository:
git clone https://github.com/joelabreurojas/DBFxSQL.git
- Install Poetry (if not alredy installed)
pip install poetry
- Set up the environment:
cd DBFxSQL
poetry shell
poetry install
- Run the tool:
python run.py # python -m dbfxsql
As a library:
- Clone the repository:
- Install the project as a Python library:
- Run the tool:
git clone https://github.com/joelabreurojas/DBFxSQL.git
cd DBFxSQL
pip install .
dbfxsql
Detailed Usage Instructions Coming Soon!
Comprehensive documentation with usage instructions and code examples will be available in a separate file shortly. Stay tuned!
Early Code Example:
This early version of the code demonstrates a basic interaction with the tool.
Link to Asciinema code example
Required:
- Bulk operation support
- MSSQL triggers/procedures for table changes.
- Handle starving connections.
Desirable:
- Limit the error logger scope.
- Transform temporal file extensions to .mdf during modification events.
- Automatic creation of temporal files based on configuration (MSSQL - Windows).
- Integrate Store Procedures & Triggers to modify temporal files (MSSQL - Windows).
- Standardize automatic sinchronization tests.
- Use models to transmit data between shapes.
- Agrupate entities like exceptions and models.
- New cli workflow based in stages.
- Implement more abstraction in controllers.
- Group origin tables by destiny tables to optimize read queries when migrating.
- Accept conditions over row_number for DBF.
- Add FIELDS options for filtering read queries.
- Configuration commands for upload and edit.
- Validate the existence of the received field type.
- Validate KeyErrors for invalid fields.
- Validate type lengths and names for consistency between DBF and SQL.
- Validate the data migration to a the same table.
- Support for relationships between +2 tables in the config file.
- Public project documentation.
- Implementation of CQRS (Command Query Responsibility Segregation) patterns.
- Sharing as a Python library.
- Development of a GUI for managing DBF and SQL.
Improvements?
- Don't hesitate to create a PR.
Problems?
- Feel free to open a new issue!
Special thanks to the following projects for making this tool possible:
- Flask Boilerplate - Python Structure Guide by Ezequiel L. Castaño
- DBF library - Pure Python DBF reader/writer by Ethan Furman
- Watchfiles library - Simple, modern and fast file watching and code reload in Python by Samuel Colvin
- Click library - A Python command line interface toolkit by Pallets Organization