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 | ||
config.py | ||
connect.py | ||
database.ini.sample | ||
import_data.py | ||
insert_hourly.py | ||
insert_item.py | ||
insert_order.py | ||
insert_payment.py | ||
LICENSE.md | ||
README.md |
Objective
This Python script extracts data from .cvs files created by Revelup application into a Postres 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.sample
todatabase.ini
. - Edit
database.ini
with your credentials for the Postgres database. - In Revelup run the following reports with output to
.csv
files:- Order History - for a range of dates.
- Payment Summary - for a range of dates.
- Product Mix - for a SPECIFIC date, so if you need a range of dates you will need to run multiple reports.
- Hourly Sales - with the filters
Service Fees
andGuests count
activated - for a SPECIFIC date, so if you need a range of dates you will need to run multiple reports.
- Copy all the
.csv
files generated by the Revelup reports to theupload
folder. - Run
python3 import_data.py
.- The application will do the following:
- Read each line of data from the
.csv
files. - Insert the data into the Postgres database.
- Move the
.csv
files to thehistory
folder.
- Read each line of data from the
- The application will do the following: