Couchbase icon

Couchbase

Couchbase node to insert, update, retrieve, and delete data from a Couchbase database using KV, Query and Search services

Actions7

Overview

This node enables interaction with a Couchbase database, specifically allowing users to delete documents stored in a specified bucket, scope, and collection. The "Delete" operation under the "Document" resource removes a document by its unique ID.

Common scenarios for this node include:

  • Cleaning up outdated or irrelevant documents from a Couchbase database.
  • Automating data lifecycle management by deleting documents based on workflow logic.
  • Removing test or temporary data after processing.

For example, if you have a document representing a user session that has expired, you can use this node to delete that session document by specifying its ID.

Properties

Name Meaning
Couchbase Bucket The target Couchbase bucket where the document resides. Can be selected from a list or entered manually.
Couchbase Scope The scope within the bucket to use. Depends on the selected bucket. Selectable from a list or manual entry.
Couchbase Collection The collection inside the scope containing the document. Depends on both bucket and scope selections. Selectable from a list or manual entry.
Document ID The unique identifier of the document to delete. Must be provided as a string.

Output

The output JSON contains an array with one object per deleted document. Each object includes:

  • id: The ID of the deleted document.
  • value: The result returned by the deletion operation (usually metadata about the removal).

Example output structure:

[
  {
    "id": "my-document-ID",
    "value": {
      // metadata about the deletion operation
    }
  }
]

No binary data is output by this operation.

Dependencies

  • Requires a valid connection to a Couchbase cluster using appropriate credentials (an API key or authentication token).
  • The node depends on the Couchbase SDK for JavaScript to perform operations.
  • The bucket, scope, and collection must exist in the Couchbase cluster, and the credentials used must have permissions to delete documents in the specified collection.

Troubleshooting

  • Could not access collection: This error indicates that the specified bucket, scope, or collection does not exist or the credentials lack permission. Verify that all three exist and that your credentials have sufficient rights.
  • Document not found: If the document ID does not exist, the deletion will fail. Ensure the document ID is correct.
  • Connection issues: Problems connecting to the Couchbase cluster may arise due to network issues or invalid credentials. Check connectivity and credential validity.
  • Invalid input parameters: Make sure the bucket, scope, collection, and document ID are correctly specified and not empty.

Links and References

Discussion