![]() ![]() You can change the view by clicking the buttons next to the view option, as shown here: Likewise, you can keep on adding any amount of data to the collection, and those data will show up on the Compass UI.Ĭompass lets you view your data in three modes. From there, you just have to type the next row of data, and there’s no need to specify the field names or data types again. This option will copy the data into a new Insert Document window. Hover over the newly created data in the Compass UI and click the Clone Document button. You can add values as JSON or key-value pairs in this Helper window.Īlthough you can insert more documents in the same way as we just discussed, we can speed it up with the Clone operation. A Helper window will pop up to insert documents. ![]() In order to add data manually, click on the second option of the Add Data dropdown. Browse and upload the file there, then tick the relevant file type and click import. When you click it, a new window will open in which you can upload the file. The first option allows you to import data as a JSON or CSV file. Here you can find the Add Data drop-down that provides you two ways to insert data: Next, click on the collection name, Students, which you created earlier, and Compass will display a new screen, like this: Locate the cursor on the School database from the left side pane of Compass and click on it. Let’s see how to add documents to our newly created database. Each record in a MongoDB database is a document. In MongoDB, data is inserted as documents. (Want to use the mongo shell instead of the Compass GUI? Learn how to create a database that way.) Creating documents The newly created database will appear in the dashboard, as shown below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |