PullQ

Reproduce Production Data in Test Environments

PullQ helps developers extract, traverse, and generate database records safely and efficiently for testing and debugging.

See Demo

Features

Interactive CLI

Guided prompts to setup connections, choose existing configs, and extract related data.

Schema Traversal

Automatically traverse parent and child tables via foreign keys up to configurable depth.

Insert Statement Generation

Generate ready-to-use SQL INSERTs for test database seeding, maintaining dependency order.

Connection Management

Save multiple DB connections securely and reuse them easily in workflows.

CLI Commands & Options

Command Flags Description Default
setup --name, --host, --port, --dbname, --username, --password Create a new database connection configuration. N/A
load None Select an existing connection configuration. N/A
extract --table, --column, --value, --depth, --direction Extract related data and generate INSERT statements. depth=2, direction=both

Example Usage

Extract related data for a user and generate SQL:


$ python cli.py extract
Root table: users
Root column: user_id
Root value: 1
[PullQ] Loaded config 'production_db'
-- Generated INSERT statements --
INSERT INTO users (user_id, name, email, phone, created_at) VALUES (...);
INSERT INTO orders (...) VALUES (...);
INSERT INTO order_items (...) VALUES (...);
INSERT INTO order_items (...) VALUES (...);
    

About PullQ

PullQ is a developer-focused CLI tool designed to quickly reproduce database issues in a safe test environment. It traverses relational schema, extracts related records, and generates SQL scripts in the correct order, so you can replicate scenarios without touching production.