This repository contains a simple Loan Management System (LMS) implemented using Python and PostgreSQL. The system includes functionalities to send daily payment reminders to clients with ongoing loans and to generate weekly activity summaries.
Technical Case Cloudwalk input_data scripts_sql scripts_python output_dataviz
Before running the application, ensure you have the following installed:
- Python (version 3.6 or higher)
- PostgreSQL (version 9.6 or higher)
- psycopg2 (Python PostgreSQL adapter)
- pandas (Python Data Analysis Library)
- smtplib (Python SMTP client)
- email.mime (Python email library)
- Create a database named postgres.
- Create two schemas named with this file: "Technical Case Cloudwalk\scripts_sql\1-create_schemas.sql"
- Create clients and loans stage tables: "Technical Case Cloudwalk\scripts_sql\2-create_tables_stage.sql"
- Create clients and loans dm tables: "Technical Case Cloudwalk\scripts_sql\3-create_tables_dm.sql"
- Create a trigger in order to control all changes in clients dm table: "Technical Case Cloudwalk\scripts_sql\4-create_trigger_clients.sql"
- Create a user stored procedure to load the dm tables from stage tables: "Technical Case Cloudwalk\scripts_sql\5-create_usp_etl_clients.sql"
import_stage_batch.py- uploading the files from the directoryexecute_clients_etl_stg_to_dm.py- moving the stage data to the dm data. This case will run the trigger to INSERT, UPDATE and DELETEinsert_or_update_clients.py- function to include or update clients.execute_loans_etl_stg_to_dm.py- moving the stage data to the dm data. There are no duplicities.data_viz.py- Notebook answering the questions. Some of them are with lists or dictionaries to perform the script without database connection.- Folder
output_datavizwith graphs. email.py- to send daily or weekly emails with information about the loans.orchestration_process.py- Done to manage the processes and perform it daily it doesn't matter the data source.
Inspiration: Cloudwalk
Oslain Junior