This section introduces how to create a document.
You must have access permissions to DMS and be logged on to the DMS console.
Select an ApsaraDB for MongoDB instance and then click Log on to Database.
After you log on to the instance, expand the left-side object list and then select the collection where you need to create the document. Right-click the collection and then select View Data to open the query window.
By default, a query command is executed in this window to query the documents in the collection. Click Create Document on the execution result tab page to open the document creation window, as shown in the following figure:
Enter the content of the document in the document creation window. The content must be compliant with the MongoShell standards.
You can choose to enclose element names in double quotation marks (“”). If an element name contains spaces, it must be enclosed in double quotation marks (“”).
After you enter the content, click Check Format to check the format of the document.
If the Format check successful message is displayed, the document has passed the format check. Otherwise, modify the content according to the error messages.
After the format check is complete, click OK in the document creation window. Confirm the document creation command in the review dialog box and then click OK to create the document.