{"repo":"mongodb-js/mongodb-schema","free":true,"listed":false,"github":"https://github.com/mongodb-js/mongodb-schema","clone":"git clone https://github.com/mongodb-js/mongodb-schema.git","description":"Infer a probabilistic schema for a MongoDB collection.","language":"TypeScript","stars":146,"topics":["mongodb","mongodb-cli","schema","compass-tools"],"license":"Apache-2.0","category":"cli-tools","readme_excerpt":"⚠️ This repository is archived. The source code is now available at https://github.com/mongodb-js/devtools-shared/tree/main/packages/mongodb-schema --- mongodb-schema [![][npm img]][npm url] [![][coverage img]][coverage url] Infer a probabilistic schema for a MongoDB collection. Usage mongodb-schema can be used as a command line tool or programmatically in your application as a node module. Command line To install mongodb-schema for command line use, run npm install -g mongodb-schema . This will add a new shell script which you can run directly from the command line. The command line tool expects a MongoDB connection URI and a namespace in the form . . Without further arguments, it will sample 100 random documents from the collection and print a schema of the collection in JSON format to stdout. Additional arguments change the number of samples ( --number ), print additional statistics about the schema analysis ( --stats ), switch to a different output format ( --format ), or let you suppress the schema output altogether ( --no-output ) if you are only interested in the schema statistics, semantic type discovery ( --semantic-types ), and the ability to disable value collection ( --no-values ). For more information, run API The following example demonstrates how mongodb-schema can be used programmatically from your node application. You need to additionally install the MongoDB node driver to follow along with this example. Make sure you have a mongod running on localhost on po","default_branch":null,"files":null,"tree":[],"storefront":"/r/mongodb-js","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mongodb-js/mongodb-schema/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}