Couchbase

The Couchbase destination writes data to Couchbase Server. Couchbase Server is a distributed NoSQL document-oriented database.

The destination writes each record as a JSON document to an existing bucket in the Couchbase database. Each Couchbase document has an ID or key which is unique to the document and used to locate the document. The destination uses the upsert operation to either create a new JSON document or to update an existing JSON document.

When you configure the Couchbase destination, you define connection information, the version of Couchbase that you use, and the existing bucket to write documents to. You either configure the destination to randomly generate a UUID for the document ID, or you specify the field in the record that contains the document ID.

Configuring a Couchbase Destination

Configure a Couchbase destination to write data to a Couchbase database.

  1. In the Properties panel, on the General tab, configure the following properties:
    General Property Description
    Name Stage name.
    Description Optional description.
    Required Fields Fields that must include data for the record to be passed into the stage.
    Tip: You might include fields that the stage uses.

    Records that do not include all required fields are processed based on the error handling configured for the pipeline.

    Preconditions Conditions that must evaluate to TRUE to allow a record to enter the stage for processing. Click Add to create additional preconditions.

    Records that do not meet all preconditions are processed based on the error handling configured for the stage.

    On Record Error Error record handling for the stage:
    • Discard - Discards the record.
    • Send to Error - Sends the record to the pipeline for error handling.
    • Stop Pipeline - Stops the pipeline. Not valid for cluster pipelines.
  2. On the Connection tab, configure the following properties:
    Connection Property Description
    URL URL to connect to the Couchbase database. Use the following format:
    <hostname>:<port>
    Bucket Existing Couchbase bucket to use.

    Enter a bucket name or define an expression that evaluates to bucket names.

    Database Version Couchbase database version:
    • Version 4.x or earlier
    • Version 5.x
    Bucket Password For database version 4.x or earlier, the password to access the bucket if the bucket is secured in the Couchbase database.
    Tip: To secure sensitive information such as usernames and passwords, you can use runtime resources or credential stores.
    Couchbase User Name For database version 5.x, the user name for the Couchbase connection.
    Couchbase User Password For database version 5.x, the password for the Couchbase account.
    Tip: To secure sensitive information such as usernames and passwords, you can use runtime resources or credential stores.
  3. On the Document tab, configure the following properties:
    Document Property Description
    Generate Document Key Generate a UUID for the document key.

    When selected, the destination randomly generates a UUID to use as the ID or key for the document.

    Document Key Field Field in the record that contains the unique ID or key for the document.