morelikethis

0.1.3 • Public • Published

morelikethis travis npm

Create more data that has the same shape as existing data.

To be used with mongodb-schema to infer a schema from your original data in a MongoDB collection, and mgeneratejs to generate more data.

The morelikethis script acts as a bridge between the two, converting a schema to a data generation template.

Example

Install morelikethis, mongodb-schema, and mgeneratejs:

npm install -g morelikethis mongodb-schema mgeneratejs

Make sure you have a MongoDB instance running on localhost, standard port 27017 (or adjust example below accordingly).

Assuming a database products and a collection catalog, run:

mongodb-schema localhost:27017 products.catalog | morelikethis | mgeneratejs -n 1000

This would generate 1000 more documents like the ones in the products.catalog collection and output them to stdout, one per line.

If you have mongoimport installed, you can write them to a new collection test.mycatalog right away:

mongodb-schema localhost:27017 products.catalog | morelikethis | mgeneratejs -n 1000 | mongoimport -d test -c mycatalog

License

Apache 2.0

Readme

Keywords

none

Package Sidebar

Install

npm i morelikethis

Weekly Downloads

58

Version

0.1.3

License

Apache-2.0

Unpacked Size

18.8 kB

Total Files

7

Last publish

Collaborators

  • orechova
  • himanshusinghs
  • c-buckingham
  • mongo-j
  • mabaasit
  • alexander_schroll
  • chuck.kalmanek
  • mongodb-js-user
  • rueckstiess
  • durran
  • lerouxb
  • fredtruman
  • mbroadst
  • hswolff
  • satyasinha
  • matt_d_rat
  • rhysm
  • tomhollander
  • alena.khineika
  • jeff-allen-mongo
  • mmarcon
  • jonathan.balsano
  • mongodb-build
  • jack.weir
  • stennie
  • mcasimir
  • kristina.stefano
  • jarjee
  • shaketbaby
  • devtoolsbot
  • addaleax
  • gribnoysup
  • mutukrish