https://github.com/experrior/db-mockdata
Project for generating mock data, conforming to the specified DB schema.
https://github.com/experrior/db-mockdata
Last synced: 5 months ago
JSON representation
Project for generating mock data, conforming to the specified DB schema.
- Host: GitHub
- URL: https://github.com/experrior/db-mockdata
- Owner: Experrior
- License: mit
- Created: 2024-07-06T11:52:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T21:22:23.000Z (almost 2 years ago)
- Last Synced: 2024-09-20T06:51:30.235Z (over 1 year ago)
- Language: Python
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Mock data generation
This is small project for generating artificial / mock data, conforming to the specified DB schema.
It can be useful to either generate pseudo-realistic data in the database, or prepare large amounts of mock data for stress testing.
The package allows for generating mock data for specified database schema.
## Configuration file schema:
```
{
"connection": "postgresql+psycopg2://admin:test@172.17.0.1:5432/ChmielDB",
"tables": {
"Projects":{
"id": "PK serial",
"project_name": "first_name",
"project_owner": "FK Users.id"
},
"Users": {
"id": "PK serial",
"first_name": "first_name",
"last_name": "last_name",
"email": "email UNIQUE",
"password": "password",
"role": "OPTION IN (USER, ADMIN)",
"address": "address",
"birth_date": "timestamp",
"phone_number": "phone"
},
"IntermediaryTable: Projects_Users": {
"project_id": "FK Projects.id",
"user_id": "FK Users.id"
},
},
"objects_count": {
"Users": 25,
"Projects": 10,
"Projects_Users": 250,
}
```
### Allowed column keywords:
#### Disclaimer:
The program only checks for uniqueness and integrity withing itself, there can still be error if there's already existing data in the database.