Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Option to use a certain set of records #4

Open
afeld opened this issue Nov 18, 2014 · 3 comments
Open

Option to use a certain set of records #4

afeld opened this issue Nov 18, 2014 · 3 comments

Comments

@afeld
Copy link

afeld commented Nov 18, 2014

At a previous company, we had a script to replicate a user's account locally, so we could test how a user with a lot of projects might experience the site, or to troubleshoot why a certain combination of settings caused a certain problem. Not sure the easiest way to generically support that syntax-wise, but would be useful.

@catherinedevlin
Copy link
Contributor

There is a --force keyword that will force the subset to include specific records - so that

rdbms-subsetter --force=user:1234

ensures that the record from the user table with primary key 1234 will be included in the test db. (And you can use --force as many times as you need to.) Does that meet your need?

@chrisvoo
Copy link

Nice works. It could be very usefull to select records inside a time interval or above or below a particular date, because it's very frequent to have automatic timestamp on row creation.

@chimeno
Copy link

chimeno commented Oct 17, 2017

First, thanks for the work on this project.
I'm in the same case as @chrisvoo , I would like to select rows based on the timestamp. (i.e. for this table, get the last rows two months before today)
Although making a select first to get the primary keys is factible, it could be great to have an option for timestamp, or, unless, having a way we can force in the way:

rdbms-subsetter --force:id:>=120000

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants