Skip to content

pragyasresta29/dbworkbench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbworkbench

Script to fetch, insert data to provided tables from postgres database.

Prerequisites

  1. Edit database credentials in core_database.ini file
  2. Update primary key id_sequence to latest if db insert is being used.
  3. Make app.py executable with chmod +x app.py
  4. The project uses python 3.7. You can install the specified version using the following command:
sudo apt-get install python3.7
  1. Install pip and venv:
sudo apt-get install python3-pip
sudo apt-get install python3-venv
  1. Create and activate new virtual environment:
cd ~
python3 -m venv myenv
source ~/myenv/bin/activate
  1. Install requirements:
pip install -r dbworkbench/requirements.txt

Run the script:

bash app.py

Arguments:

Argument Parameter Description
-h or --help NA show help message and exit
-i or --insert table msb msb_id countryId ** table:** table name to insert
msb: msb name
**msb_id: **MSB's company id
countryId: Destination Country Id.
All the data for specified table, msb and country will be added.
-s or --select table [columns ...] ** table:** table to be fetched
[columns ...]: list of columns to fetch. Eg: name id
Get data of specified tables and columns
-l or --limit limit Limit: total number of data to fetch.
It can be used along with --select argument to limit the no. of data to be fetched.
-e or --enable type countryId companyId Enable payers/bank of specified country id for mto

About

Sql to import data

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages