A CLI tool to generate millions of pseudo-random BSON documents and insert them into MongoDB for testing and development.
mgodatagen is a Go-based command-line tool that generates pseudo-random BSON documents and inserts them into MongoDB instances. It solves the problem of creating large, realistic test datasets for MongoDB, allowing developers to test new data structures, application performance, and scalability as databases grow.
MongoDB developers and database administrators who need to populate databases with test data for development, performance benchmarking, or application testing.
Developers choose mgodatagen for its comprehensive BSON type support, ability to generate millions of documents quickly, and flexible configuration via JSON, making it a powerful alternative to manual data creation or simpler scripts.
Generate random data for MongoDB
Supports all MongoDB BSON types, ensuring full compatibility with real-world schemas and data models, as explicitly listed in the README.
Integrates with gofakeit to generate plausible fake data like names, emails, and addresses, making it ideal for application testing and demos.
Enables cross-collection references and aggregation generators (count, value, bound) to simulate relational data and complex derived fields across collections.
Configurable workers and batch insertion allow efficient generation of millions of documents, with support for sharded collections to test distributed setups.
Requires detailed JSON configuration files with a steep learning curve, which can be time-consuming for simple or ad-hoc data generation needs.
Only supports PLAIN and MONGODB-X509 authentication, missing broader MongoDB options like SCRAM-SHA, which restricts use in some secured environments.
Faker generators are notably slower for large datasets (10M+ documents), forcing users to avoid them or use custom generators, as admitted in the README.
Variety: a MongoDB schema analyzer
A database migration tool for MongoDB in Node
🌱 The ultimate solution for populating your MongoDB database.
Connect to MongoDB and Atlas and directly from your VS Code environment, navigate your databases and collections, inspect your schema and use playgrounds to prototype queries and aggregations.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.