Subset your PostgreSQL database with ease

Copy only the parts of your database you need. Test your app using real data that's just the right size.

DatabaseCI allows you to create subsetted copies of your database for more accurate development, testing, and investigation of production issues.

Choose either specific rows or a random sample: DatabaseCI makes sure all the related data is included too.

DatabaseCI runs anywhere you want. Our API analyzes your schema and provides the intelligence but never sees your data.

Example

You want a subset of your production database, containing a random 1% of historical orders, but with all orders from the previous week.

Step 1. Create a fresh database and a short config file:

real_db_url: postgres://production.server/production
copy_db_url: postgres:///empty

api_key: 72184874-e914-4cd6-914a-9eea0d905e04

schemas:
  public:
    orders:
      sample_percent: 1
      where: "order_date >= current_date - 7"
    customers:

Step 2. Run the command:

$ databaseci copy config.yaml

DatabaseCI copies the specified rows and ensures linked rows in related tables are copied too.

Step 3. Subsetted copy created!

Inspecting database...
Inspection complete.

Replicating schema on copy.
Copy setup complete.

Copying subsetted rows...

TABLE                LOADED REMAINING
"public"."customers" 1402   0
"public"."orders"    2077   0

Rows copied.

Applying constraints on copy...
Complete.

Command line tool or Python library

The same functionality is also available via Python library for further flexibility and tighter integration with your code.

Guaranteed results

DatabaseCI is available via monthly subscription, with a no-questions-asked refund policy if it doesn't enhance your team's productivity, dev-prod parity, and testability.

See plans and pricing ->
Give feedback