Establishing a Connection
Configure a Connection Profile
From the CData ribbon, click Get Data and select From Couchbase to launch the CData Query window. To setup your connection, you will have to click the Select button. Here you can set the connection settings, test the connection, and save the connection profile.
Connecting to Couchbase
To connect to data, set the Server property to the hostname or IP address of the Couchbase server(s) you are authenticating to. If your Couchbase server is configured to use SSL, you can enable it either by using an https URL for Server (like 'https://couchbase.server'), or by setting the UseSSL property to True.
By default, the add-in connects to the N1QL Query service. In order to connect to the Couchbase Analytics service, you will also need to set the CouchbaseService property to Analytics.
A few special settings are required to connect to Couchbase Cloud:
- Set the AuthScheme to Basic
- Set the Server option to the domain listed in the Couchbase Cloud console.
- Enable the UseSSL option.
- Set the ConnectionMode to Cloud
- Set the DNSServer option to a DNS server. In most cases this should be a public DNS service like 18.104.22.168 or 22.214.171.124.
- Set the SSLServerCert option to * to trust the Couchbase server certificate. You can also provide the certificate using that option or your trust store if you want the add-in to validate it.
Authenticating with Couchbase
The add-in supports several forms of authentication depending upon how your Couchbase Server is configured. Couchbase Cloud only accepts Standard Authentication, while Couchbase Server accepts all forms.
Authenticating with Standard Authentication
To authenticate with standard authentication, set the following:
- AuthScheme: Use the Basic option.
- User: The user authenticating to Couchbase.
- Password: The password of the user authenticating to Couchbase.
Authenticating with Client Certificates
The add-in supports authenticating with client certificates when SSL is enabled. To use client certificate authentication, set the following properties.
- AuthScheme: Required. Use the SSLCertificate option.
- SSLClientCertType: Required. The type of client certificate set within SSLClientCert.
- SSLClientCert: Required. The client certificate in the format given by SSLClientCertType. Usually the path to your private key file.
- SSLClientCertPassword: Optional. The password of the client certificate if it is encrypted.
- SSLClientCertSubject: Optional. The subject of the client certificate, by default the first certificate found in the store. This is required if more than one certificate is available in the certificate store.
Authenticating with a Credentials File
You can also authenticate using using a credentials file containing multiple logins. This is included for legacy use and is not recommended when connecting to a Couchbase Server that supports role-based authentication.
- AuthScheme: Use the CredentialsFile option.
- CredentialsFile; The path to the credentials file. Refer to Couchbase's documentation for more information on the format of this file.
Connection PropertiesThe Connection properties describe the various options that can be used to establish a connection.
Managing ConnectionsAfter successfully authenticating to Couchbase you will be able to customize the data you are importing. To learn more about this, see Managing Connections.