stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 225 forks source link

Feature: debug mode with row limit #87

Open jtmarmon opened 9 years ago

jtmarmon commented 9 years ago

It would be useful to not have to import a million rows just to test a collection file. I think it would be useful to be able to pass a row-limit parameter to Mosql either via CLI or in the collection map. Perhaps even a query.

@nelhage do you think the use case for this is broad enough for a PR

nelhage commented 9 years ago

Yeah, that seems plausible. I'd probably make it a CLI flag, --limit or something. I'd also consider --query or --filter that only applies to the initial import and takes a JSON-encoded query.

jtmarmon commented 9 years ago

awesome. i'll see if i can get a chance to work on this over the next couple of weeks.