Post data extracted from Revelup into a Postgres database. This repo is mirrored at https://gitlab.com/kikobar/revelupex and https://github.com/kikobar/revelupex
| failed | ||
| history | ||
| logs | ||
| upload | ||
| .gitignore | ||
| __init__.py | ||
| CODE_OF_CONDUCT.md | ||
| config.py | ||
| connect.py | ||
| CONTRIBUTING.md | ||
| database.ini.sample | ||
| import_data.py | ||
| insert_hourly.py | ||
| insert_item.py | ||
| insert_order.py | ||
| insert_payment.py | ||
| LICENSE.md | ||
| README.md | ||
| SECURITY.md | ||
Objective
This Python script extracts data from .csv files created by the Revelup application and post it into a Postgres database.
Requirements
- Python installed on the machine running this application.
- Credentials with writing access to a Postgres database.
How to run this application
- Copy the file
database.ini.sampletodatabase.ini. - Edit
database.iniwith your credentials for the Postgres database. - In Revelup run the following reports with output to
.csvfiles:- Order History - run it for any range of dates.
- Payment Summary - run it for any range of dates.
- Product Mix - run it for a SPECIFIC DATE ONLY, so if you need a range of dates you will need to run multiple reports.
- Hourly Sales - with the filters
Service FeesandGuests countactivated - run it for a SPECIFIC DATE ONLY, so if you need a range of dates you will need to run multiple reports.
- Copy all the
.csvfiles generated by the Revelup reports to theuploadfolder. - Run
python3 import_data.py.- The application will do the following:
- Read each line of data from the
.csvfiles. - Insert the data into the Postgres database.
- Move the
.csvfiles to thehistoryfolder.
- Read each line of data from the
- The application will do the following: