Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.64 KB

README.md

File metadata and controls

100 lines (70 loc) · 2.64 KB

Synthesized TDK PostgreSQL Demo

test postgres

Pagila is a PostgreSQL version of the well-known MySQL Sakila sample database.

Clone this repo:

git clone https://github.com/synthesized-io/pagila-tdk-demo
cd pagila-tdk-demo/postgres

Generation based on the empty schema

generation from scratch demo

Run TDK:

export CONFIG_FILE=config_generation_from_scratch.tdk.yaml
docker compose -f docker-compose.yaml -f docker-compose-input-db.yaml run tdk

Execute control_query.sql script on the original database and ensure that there is no data:

usql pg://postgres:postgres@localhost:6000/postgres -f control_query.sql

Execute the control_query.sql script on the resulting database to ensure that we have realistic and beautiful data:

usql pg://postgres:postgres@localhost:6001/postgres -f control_query.sql

Generation based on the existing data

generation demo

Run TDK:

export CONFIG_FILE=config_generation.tdk.yaml
docker compose run tdk

Execute control_query.sql script on the original database:

usql pg://postgres:postgres@localhost:6000/postgres -f control_query.sql

Execute control_query.sql script on the resulting database:

usql pg://postgres:postgres@localhost:6001/postgres -f control_query.sql

Masking of the existing data

masking demo

Run TDK:

export CONFIG_FILE=config_masking.tdk.yaml
docker compose run tdk

Execute control_query.sql script on the original database:

usql pg://postgres:postgres@localhost:6000/postgres -f control_query.sql

Execute control_query.sql script on the masked database:

usql pg://postgres:postgres@localhost:6001/postgres -f control_query.sql

Subsetting of the existing data

subsetting demo

Run TDK:

export CONFIG_FILE=config_subsetting.tdk.yaml
docker compose run tdk

Execute control_query.sql script on the original database:

usql pg://postgres:postgres@localhost:6000/postgres -f control_query.sql

Execute control_query.sql script on the resulted database:

usql pg://postgres:postgres@localhost:6001/postgres -f control_query.sql

Advanced

Alternatively, you can use the embedded pgAdmin 4. Simply go to http://localhost:8888/browser and explore the two preconfigured database connections (use postgres as the password).