PostgreSQL service populator.
Project description
Tool: pg_populator
Description:
This program populates an already existing PostgreSQL service with: - N databases. The specific amount of databases is parametrized through the -n argument. - N tables inside each database. The specific amount of tables is parametrized through the -t argument. - Some data rows inside every table. The specific amount of rows is parametrized through the -r argument.
This program will make sure that local postgreSQL service contains, at least, the amount of databases and tables defined in the required command line arguments -n (–num_db) and -t (–num_tables) per database. It will also add the amount of rows specified in the -r parameter. This program will NOT delete any database, table or row.
Requirements:
A running postgreSQL database must be previously configured. To make this software works, the user that runs this script must have the ~/.pgpass properly configured. To get this done, I recommend you to use the scripts stored in the next repository: https://gitlab.com/jaqm/carto_test.git
How to’s:
Note: The next commands are meant to be run in the same that directory in which this Readme.1st file is stored.
Disable any previously activated virtualenv:
$ deactivate
Enable virtualenv:
$ source venvs/1_populate_db/bin/activate
Get the program help:
$ ./run -v
Run the tool (example):
Run the next command to create 10 databases with 20 tables and insert 100 rows each of them.
$ ./run -n 10 -t 20 -r 100
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pg_populator-0.0.4.tar.gz
.
File metadata
- Download URL: pg_populator-0.0.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc24d02dc2851d874d7f8d331dc9f2299ae57fe73f5eec578a8ae1708d672528 |
|
MD5 | ffd1301cd652a678b6204ccc3f45a6d9 |
|
BLAKE2b-256 | 42d93fa3dbebcb59ddbb8fa368cb687f0b19d9f5028e00ad5944eae24b6dfe1f |