This scenario queries the JSON documents in the Couchbase database by unique document IDs. Specifically, we use the document IDs as the key to query the documents, whose contents are JSON data. The documents in the Couchbase database are shown below:
For how to write such documents to the database, see Scenario: Inserting documents to a data bucket in the Couchbase database.
Drop tCouchbaseConnection, tCouchbaseInput, tCouchbaseClose and tLogRow onto the workspace.
Link tCouchbaseConnection to tCouchbaseInput using the OnSubjobOk trigger.
Link tCouchbaseInput to tLogRow using a Row > Main connection.
Link tCouchbaseInput to tCouchbaseClose using the OnSubjobOk trigger.
Double-click tCouchbaseConnection to open its Basic settings view.
In the Data Bucket field, enter the name of the data bucket in the Couchbase database.
In the Password field, enter the password for access to the data bucket.
In the URIs table, click the [+] button to add lines as needed, where you can enter the URIs of the Couchbase server nodes.
Double-click tCouchbaseInput to open its Basic settings view.
Select the Use existing connection check box to reuse the connection.
In the Key field, enter the document IDs, for example "ELT Overview", "Integration at any scale".
Click the Edit schema button to open the schema editor. The schema contains two pre-defined fields, Key and Value.
Double-click tLogRow to open its Basic settings view.
Select Table (print values in cells of a table for a better display of the results.