A GUI tool that reads a file and converts the file into a database table.
This tool emphasises on flexibility, allowing you to connect to any database by specifying the needed credentials.
Blog post of what I learnt from making it: Making a CSV to Database Tool
- pandas
- sqlalchemy
- tkinter
- psycopg2
- pymysql
- sqlalchemy_utils
The tool is located in the tool
folder of the project.
This is a usage guide for a regular set of operations in the application.
- Ensure that you have all the libraries used installed on your machine, if you don't install them with the following commands:
pip install pandas
pip install sqlalchemy
pip install psycopg2
pip install sqlalchemy_utils
pip install pymysql
- Download/Clone/Fork this repository to your local machine
- Navigate to the folder
- Run
launch.py
cd Desktop
git clone https://github.com/woojiahao/file-to-db-tool
cd file-to-db-tool/tool
python launch.py
- When the program has launched, select the dialect of SQL you will be using (See Available SQL Dialects).
- By selecting them, it will automaticaly fill in the credentials needed for a localhost conenction to that database, feel free to edit the credentials if you need to conenct to an external database.
- Enter the database name that you wish to connect to and press
Connect
. - Select a supported file (See Supported File Types) and convert.
Sometimes, you might want to change the default credentials that get loaded in when you change the SQL dialect, the tool now supports the reading of a config.json
file that holds all of the credentials.
To edit the credentials, navigate into config
folder and edit the config.json
file to suit the credentials that you want.
- PostgreSQL
- MySQL
.csv
- Allow the user to enter a connection string rather than breaking everything up themselves
- Add screenshots for the instructions