
Generate Realistic Dummy Data for MongoDB
tl;dr I build a tool that utilizes the data schema exported from MongoDB Compass, and use vector search to determine what is the most appropriate Faker method for each field, then generate realistic dummy data. The repository is here: mock-data Earlier MongoDB released a Compass version that supports data modeling. This has been a long desired feature and had been asked many times in my 10-years MongoDB professional service life. Now that it becomes real, I wanted to make use of it and possibly make developer's life easier. So when I was asked for this feature, it's usually not because people want to use the data model for schema validation, but mostly it's used as a data dictionary and allows teammates to have identical understanding of how the data should look like. And as soon as we have the model, we can start mocking some dummy data for coding and testing. Usually it takes some time for developers to write some script to generate data that follows the data model, and looks as real
Continue reading on Dev.to
Opens in a new tab


