Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kafetzisthomas/db_cleaner
Cleans your PostgreSQL db by removing rows with NULL values in specified columns.
https://github.com/kafetzisthomas/db_cleaner
Last synced: 5 days ago
JSON representation
Cleans your PostgreSQL db by removing rows with NULL values in specified columns.
- Host: GitHub
- URL: https://github.com/kafetzisthomas/db_cleaner
- Owner: KafetzisThomas
- License: mit
- Created: 2024-07-12T17:43:37.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-14T18:01:29.000Z (6 months ago)
- Last Synced: 2024-07-14T20:36:15.462Z (6 months ago)
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DB_Cleaner
__What Is This?__ - Cleans your PostgreSQL db by removing rows with NULL values in specified columns.
__How to Download__: Open the terminal on your machine and type the following command:
```bash
git clone https://github.com/KafetzisThomas/DB_Cleaner.git
```## Setup
### Set up Virtual Environment
```bash
➜ cd path/to/script/directory
$ python3 -m venv env/
$ source env/bin/activate
```### Install Dependencies
```bash
$ pip3 install -r requirements.txt
```### Create Enviroment Variable file
```bash
$ touch .env
$ nano .env
```Add the following environment variables (modify as needed):
```bash
➜ DB_HOST="example_host"
➜ DB_NAME="example_name"
➜ DB_TABLE="example_table"
➜ DB_COLUMN="example_column"
➜ DB_USER="example_user"
➜ DB_PASSWORD="example_password"
➜ DB_PORT="example_port"
```Save changes and close the file.
### Run Python Script
```bash
$ python3 main.py
```