TDV Adapter for Couchbase

Build 22.0.8462

Data Model

Overview

Depending upon the connection settings being used, the adapter can present several different mappings between Couchbase entities and relational tables and views. For more details on each of these capabilities, refer to the NoSQL portion of this documentation.

  • When connecting to the N1QL query service, the adapter models Couchbase buckets as relational tables. In addition, if TypeDetectionScheme is set to DocType or Infer, the adapter will present different document flavors in each bucket as their own tables.
  • When connecting to the Analytics service, the adapter models Couchbase datasets as relational views.
  • When connecting with either service, the adapter can expose arrays of data as child tables or views.

Please see the Automatic Schema Discovery section for more details on how flavor and child tables are exposed. In addition, the NewChildJoinsMode connection property is recommended for workflows that make heavy use of child tables. The documentation for that connection property details the improvements it makes to the adapter data model.

Dataverses, Scopes and Collections

Couchbase has different ways of grouping buckets and datasets depending on the CouchbaseService and version of Couchbase you are connecting to:

  • Couchbase organizes Analytics datsets into groups called dataverses. By default the adapter exposes datasets from all dataverses using compound names like Default.users as described in DataverseSeparator. It is important to remember that these compound names must be quoted when used in queries, for example SELECT * FROM [Default.users]
  • You may also set the Dataverse property to limit the the adapter to exposing a single dataverse. This disables compound names so view names will not include the dataset.
  • When connecting to Couchbase 7 and above, the adapter will use the scope, collection and bucket/dataset name to build table and view names. For example, a table with a name like crm.accounts.customers exposes the customers collection under the accounts scope of the crm bucket. These must be quoted the same as other compound names when used in queries, for example SELECT * FROM [crm.accounts.customers]

Live Metadata

All of the schemas provided by the adapter are dynamically retrieved from Couchbase, so any changes in the buckets or fields within Couchbase will be reflected in the adapter the next time you connect. You may also issue a reset query to refresh schemas without having to close the connection:

RESET SCHEMA CACHE

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462