This Python tool helps you see changes in a database table. It exports the contents of a table to CSV twice (before/after) and shows the differences (added, removed, and changed rows).
- Create a
.envfile with your database credentials (see.env-example). - Adjust the SQL query (
sql_query) and comparison key (compare_key) inrun.py. - Install dependencies:
pip install -r requirements.txt
- Run the script:
python run.py
- Follow the instructions in the terminal.
The CSV files will be saved as file_01.csv and file_02.csv and compared automatically.
Notes:
- Only supports PostgreSQL.
- Never commit your
.envfile to the repository!