Adding documents to Cloudant databases

You can add new documents to Cloudant databases.

About this task

To add a Cloudant document, complete the following steps:


  1. To open the Select a wizard page of the New wizard, from the main menu, select File > New > Other.
  2. To open the Create Cloudant Document wizard, expand the QMF objects folder, select Cloudant Document, and then click Next.
  3. From the Data source list, select the Cloudant data source that defines the connection to the database to which you want to add a document.
  4. Optional: Enter the ID number that you want to use for the document in the ID field.
    Tip: If you do not specify the document ID, it is generated automatically.
  5. To create a document and open it in the Cloudant Document editor, click Finish.
  6. In the Document content field, specify the content of the document in the JSON format.
  7. Optional: In the Service Fields section, view the ID number that is assigned to the document in the _Id field and the revision number that is added by the server when you add or modify the document in the _Rev field.
  8. To save the document that you created to the database, click Save.
    After you save the document, you can add BLOB objects to it.
  9. To add BLOB objects to the document, in the Attachments section, click the Add button to navigate to the required file and attach it to the document. The name of the attached files, their types, and sizes are displayed in the Attachments table.
    Tip: To download the file that is attached to the document from the database to your local machine, select it in the Attachments table and click Download. To remove the attached file from the document, select it and click Remove.