CData Cloud offers access to Couchbase across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a SQL Server database can connect to Couchbase through CData Cloud.
CData Cloud allows you to standardize and configure connections to Couchbase as though it were any other OData endpoint or standard SQL Server.
This page provides a guide to Establishing a Connection to Couchbase in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.
Establishing a Connection shows how to authenticate to Couchbase and configure any necessary connection properties to create a database in CData Cloud
Accessing data from Couchbase through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.
Connect to Couchbase by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.
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 Cloud 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.
Set the following to connect to Couchbase Cloud:
The Cloud supports several forms of authentication. Couchbase Cloud only accepts Standard authentication, while Couchbase Server accepts Standard authentication, client certificates, and credentials files.
To authenticate with standard authentication, set the following:
The Cloud supports authenticating with client certificates when SSL is enabled. To use client certificate authentication, set the following properties:
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.
Couchbase is a schema-free document database that provides high performance, availability, and scalability. These features are not necessarily incompatible with a standards-compliant query language like SQL-92.
The Cloud models the schema-free Couchbase objects into relational tables and translates SQL queries into N1QL or SQL++ (Analytics) queries to get the requested data. In this section we will show various schemes that the Cloud offers to bridge the gap with relational SQL and a document database.
When the Cloud first connects to Couchbase, it opens each bucket and scans a configurable number of rows from that bucket. It uses those rows to determine the columns in that bucket and their data types, as well as how to build flavored and child tables for any arrays within those documents. For Couchbase Enterprise version 4.5.1 and later, the Cloud may can also be configured to use the INFER command when TypeDetectionScheme is set to INFER. This allows the Cloud to get a more accurate column listing for the bucket, and to detect more complex flavors.
When using the Analytics service, the Cloud only does column and child table detection. Flavored tables are provided by Couchbase itself using shadow datasets. Also, Analytics mode does not currently have INFER support, so only row scan is supported.
For more details, refer to Automatic Schema Discovery to see how flavored tables and child tables are modelled from Couchbase data. Setting NumericStrings is also recommended as it can avoid type detection issues with certain kinds of text data.
Optionally, you can use Custom Schema Definitions to project your chosen relational structure on top of a Couchbase object. This allows you to define your chosen column names, their data types, and the locations of their values in the Couchbase document.
See Query Mapping for more details on how various N1QL and SQL++ operations are represented as SQL.
See Vertical Flattening for more details on how arrays and objects are mapped into fields.
See JSON Functions for more details on how to extract data from raw JSON strings.
If the documents within a bucket contain fields with arrays, then the Cloud will expose those fields as their own tables in addition to exposing them as JSON aggregates on the main table. The structure of these child tables depends upon whether the array contains objects or primitive values.
If the arrays contain primitive values like numbers or strings, the child table will have only two columns: one called "Document.Id" which is the primary key of the document containing the array, and one called "value" which contains the value within the array. For example, if the bucket "Games" contains these documents:
/* Primary key "1" */
{
"scores": [1,2,3]
}
/* Primary key "2" */
{
"scores": [4,5,6]
}
The Cloud will build a table called "Games_scores" containing these rows:
| Document.Id | value |
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 2 | 4 |
| 2 | 5 |
| 2 | 6 |
If the arrays contain objects, the child table will have a column for each field that occurs within the objects, as well as a "Document.Id" column which contains the primary key of the document containing the array. For example, if the bucket "Games" contains these documents:
/* Primary key "1" */
{
"moves": [
{"piece": "pawn", "square": "c3"},
{"piece": "rook", "square": "d5"}
]
}
/* Primary key "2" */
{
"moves": [
{"piece": "knight", "square": "f1"},
{"piece": "bishop", "square": "e4"}
]
}
The Cloud will build a table called "Games_moves" containing these rows:
| Document.Id | piece | square |
| 1 | pawn | c3 |
| 1 | rook | d5 |
| 2 | knight | f1 |
| 2 | biship | e4 |
Note that the above data model is not fully relational, which has important limitations for use-cases that involve complex JOINs or DML operations on child tables. The NewChildJoinsMode connection property exposes an alternative data model which avoids these limitations. Please refer to its page in the connection property section of the documentation for more details.
The Cloud can also detect when there are multiple types of documents within the same bucket, as long as TypeDetectionScheme is set to Infer or DocType and CouchbaseService is set to N1QL. These different types of documents are exposed as their own tables containing only the appropriate rows.
For example, the bucket "Games" contains documents which have a "type" value of either "chess" or "football":
/* Primary key "1" */
{
"type": "chess",
"result": "stalemate"
}
/* Primary key "2" */
{
"type": "chess",
"result": "black win"
}
/* Primary key "3" */
{
"type": "football",
"score": 23
}
/* Primary key "4" */
{
"type": "football",
"score": 18
}
The Cloud will create three tables for this bucket: one called "Games" which contains all the documents:
| Document.Id | result | score | type |
| 1 | stalemate | NULL | chess |
| 2 | black win | NULL | chess |
| 3 | NULL | 23 | football |
| 4 | NULL | 18 | football |
One called "Games.chess" which contains only documents where the type is "chess":
| Document.Id | result | type |
| 1 | stalemate | chess |
| 2 | black win | chess |
And one called "Games.football" which contains only documents where the type is "football":
| Document.Id | score | type |
| 3 | 23 | football |
| 4 | 18 | football |
Note that the Cloud will not include columns in a flavored table that are not defined on the documents in that flavor. For example, even though both the "result" and "score" columns are included on the base table, "Games.chess" only includes "result" and "Games.football" only includes "score".
/* Primary key "1" */
{
"type": "chess",
"results": ["stalemate", "white win"]
}
/* Primary key "2" */
{
"type": "chess",
"results": ["black win", "stalemate"]
}
/* Primary key "3" */
{
"type": "football",
"scores": [23, 12]
}
/* Primary key "4" */
{
"type": "football",
"scores": [18, 36]
}
Then the Cloud will generate these tables:
| Table Name | Child Field | Flavor Condition |
| Games | ||
| Games_results | results | |
| Games_scores | scores | |
| Games.chess | "type" = "chess" | |
| Games.chess_results | results | "type" = "chess" |
| Games.football | "type" = "football" | |
| Games.football_scores | scores | "type" = "football" |
The Cloud maps SQL-92-compliant queries into corresponding N1QL or SQL++ queries. Although the mapping below is not complete, it should help you get a sense for the common patterns the Cloud uses during this transformation.
The SELECT statements are translated to the appropriate N1QL SELECT query as shown below. Due to the similarities between SQL-92 and N1QL, many queries will simply be direct translations.
One major difference is that when the schema for a given Couchbase bucket exists in the Cloud, a SELECT * query will be translated to directly select the individual fields in the bucket. The Cloud will also automatically create a Document.Id column based on the primary key of each document in the bucket.
| SQL Query | N1QL Query |
| SELECT * FROM users | SELECT META(`users`).id AS `id`, ... FROM `users` |
| SELECT [Document.Id], status FROM users | SELECT META(`users`).id AS `Document.Id`, `users`.`status` FROM `users` |
| SELECT * FROM users WHERE status = 'A' OR age = 50 | SELECT META(`users`).id AS `id`, ... FROM `users` WHERE TOSTRING(`users`.`status`) = "A" OR TONUMBER(`users`.`age`) = 50 |
| SELECT * FROM users WHERE name LIKE 'A%' | SELECT META(`users`).id AS `id`, ... FROM `users` WHERE TOSTRING(`users`.`name`) LIKE "A%" |
| SELECT * FROM users WHERE status = 'A' ORDER BY [Document.Id] DESC | SELECT META(`users`).id AS `id`, ... FROM `users` WHERE TOSTRING(`users`.`status`) = "A" ORDER BY META(`users`).id DESC |
| SELECT * FROM users WHERE status IN ('A', 'B') | SELECT META(`users`).id, ... FROM `users` WHERE TOSTRING(`users`.`status`) IN ["A", "B"] |
Note that conditions can include extra type functions if the Cloud detects that a type conversion may be necessary. You can disable these type conversions using the StrictComparison property. For clarity, the rest of the N1QL samples are shown without these extra conversion functions.
When a query has either equals or IN clause that targets the Document.Id column, and there is no OR clause to override it, the Cloud will convert the Document.Id filter into a USE KEYS clause. This avoids the overhead of scanning an index because the document keys are already known to the N1QL engine (this optimization does not apply to the Analytics CouchbaseService).
| SQL Query | N1QL Query |
| SELECT * FROM users WHERE [Document.Id] = '1' | SELECT ... FROM `users` USE KEYS ["1"] |
| SELECT * FROM users WHERE [Document.Id] IN ('2', '3') | SELECT ... FROM `users` USE KEYS ["2", "3"] |
| SELECT * FROM users WHERE [Document.Id] = '4' OR [Document.Id] = '5' | SELECT ... FROM `users` USE KEYS ["4", "5"] |
| SELECT * FROM users WHERE [Document.Id] = '6' AND status = 'A' | SELECT ... FROM `users` USE KEYS ["6"] WHERE `status` = "A" |
In addition to being used for SELECT queries, the same optimization is performed for DML operations as shown below.
As long as all the child tables in a query share the same parent, and they are combined using INNER JOINs on their Document.Id columns, the Cloud will combine the JOINs into a single UNNEST expression. Unlike N1QL UNNEST queries, you must explicitly JOIN with the base table if you want to access its fields.
| SQL Query | N1QL Query |
| SELECT * FROM users_posts | SELECT META(`users`).id, `users_posts`.`text`, ... FROM `users` UNNEST `users`.`posts` AS `users_posts` |
| SELECT * FROM users INNER JOIN users_posts ON users.[Document.Id] = users_posts.[Document.Id] | SELECT META(`users`).id, `users`.`name`, ..., `users_posts`.`text`, ... FROM `users` UNNEST `users`.`posts` AS `users_posts` |
| SELECT * FROM users INNER JOIN users_posts ... INNER JOIN users_comments ON ... | SELECT ... FROM `users` UNNEST `users`.`posts` AS `users_posts` UNNEST `users`.`comments` AS `users_comments` |
Flavored tables always have the appropriate condition included when you query, so that only documents from the flavor will be returned:
| SQL Query | N1QL Query |
| SELECT * FROM [users.subscriber] | SELECT ... FROM `users` WHERE `docType` = "subscriber" |
| SELECT * FROM [users.subscriber] WHERE age > 50 | SELECT ... FROM `users` WHERE `docType` = "subscriber" AND `age` > 50 |
N1QL has several built-in aggregate functions. The Cloud makes extensive use of this for various aggregate queries. See some examples below:
| SQL Query | N1QL Query |
| SELECT Count(*) As Count FROM Orders | SELECT Count(*) AS `count` FROM `Orders` |
| SELECT Sum(price) As total FROM Orders | SELECT Sum(`price`) As `total` FROM `Orders` |
| SELECT cust_id, Sum(price) As total FROM Orders GROUP BY cust_id ORDER BY total | SELECT `cust_id`, Sum(`price`) As `total` FROM `Orders` GROUP BY `cust_id` ORDER BY `total` |
| SELECT cust_id, ord_date, Sum(price) As total FROM Orders GROUP BY cust_id, ord_date Having total > 250 | SELECT `cust_id`, `ord_date`, Sum(`price`) As `total` FROM `Orders` GROUP BY `cust_id`, `ord_date` Having `total` > 250 |
The SQL INSERT statement is mapped to the N1QL INSERT statement as shown below. This works the same for both top-level fields as well as fields produced by Vertical Flattening:
| SQL Query | N1QL Query |
| INSERT INTO users ([Document.Id], age, status) VALUES ('bcd001', 45, 'A') | INSERT INTO `users` (KEY, VALUE) VALUES ('bcd001', { "age" : 45, "status" : "A" }) |
| INSERT INTO users ([Document.Id], [metrics.posts]) VALUES ('bcd002', 0) | INSERT INTO `users` (KEY, VALUE) VALUES ('bcd002', {"metrics': {"posts": 0}}) |
Inserts on child tables are converted internally into N1QL UPDATEs using array operations. Since that this does not create the top-level document, the Document.Id provided must refer to a document that already exists.
Another limitation of child table INSERTs is that multi-valued INSERTs must all use the same Document.Id. The provider will verify this before modifying any data and raise an error if this constraint is violated.
| SQL Query | N1QL Query |
| INSERT INTO users_ratings ([Document.Id], value) VALUES ('bcd001', 4.8), ('bcd001', 3.2) | UPDATE `users` USE KEYS "bcd001" SET `ratings` = ARRAY_PUT(`ratings`, 4.8, 3.2) |
| INSERT INTO users_reviews ([Document.Id], score) VALUES ('bcd002', 'Great'), ('bcd002', 'Lacking') | UPDATE `users` USE KEYS "bcd001" SET `ratings` = ARRAY_PUT(`ratings`, {"score": "Great"}, {"score": "Lacking"}) |
Bulk INSERTs are also supported. The SQL Bulk INSERT is converted as shown below:
INSERT INTO users#TEMP ([Document.Id], KEY, VALUE) VALUES ('bcd001', 45, "A")
INSERT INTO users#TEMP ([Document.Id], KEY, VALUE) VALUES ('bcd002', 24, "B")
INSERT INTO users SELECT * FROM users#TEMP
is converted to:
INSERT INTO `users` (KEY, VALUE) VALUES
('bcd001', {"age": 45, "status": "A"}),
('bcd002', {"age": 24, "status": "B"})
Like multi-valued INSERTs on child tables, all the rows in a bulk INSERT must also have the same Document.Id.
The SQL UPDATE statement is mapped to the N1SQL UPDATE statement as shown below:
| SQL Query | N1QL Query |
| UPDATE users SET status = 'C' WHERE [Document.Id] = 'bcd001' | UPDATE `users` USE KEYS ["bcd001"] SET `status` = "C" |
| UPDATE users SET status = 'C' WHERE age > 45 | UPDATE `users` SET `status` = "C" WHERE `age` > 45 |
When updating a child table, the SQL query is converted to an UPDATE query using either a "FOR" expression or an "ARRAY" expression:
| SQL Query | N1QL Query |
| UPDATE users_ratings SET value = 5.0 WHERE value > 5.0 | UPDATE `users` SET `ratings` = ARRAY CASE WHEN `value` > 5.0 THEN 5 ELSE `value` END FOR `value` IN `ratings` END |
| UPDATE users_reviews SET score = 'Unknown' WHERE score = '' | UPDATE `users` SET `$child`.`score` = 'Unknown' FOR `$child` IN `reviews` WHEN `$child`.`score` = "" END |
| SQL Query | N1QL Query |
| UPDATE [users.subscriber] SET status = 'C' WHERE age > 45 | UPDATE `users` SET `status` = "C" WHERE `docType` = "subscriber" AND `age` > 45 |
The SQL DELETE statement is mapped to the N1QL DELETE statement as shown below:
| SQL Query | N1QL Query |
| DELETE FROM users WHERE [Document.Id] = 'bcd001' | DELETE FROM `users` USE KEYS ["bcd001"] |
| DELETE FROM users WHERE status = 'inactive' | DELETE FROM `users` WHERE `status` = "inactive" |
When deleting from a child table, the SQL query is converted to an UPDATE query using an "ARRAY" expression:
| SQL Query | N1QL Query |
| DELETE FROM users_ratings WHERE value < 0 | UPDATE `users` SET `ratings` = ARRAY `value` FOR `value` IN `ratings` WHEN NOT (`value` < 0) END |
| DELETE FROM users_reviews WHERE score = '' | UPDATE `users` SET `reviews` = ARRAY `$child` FOR `$child` IN `reviews` WHEN NOT (`$child`.`score` = "") END |
| SQL Query | N1QL Query |
| DELETE FROM [users.subscriber] WHERE status = 'inactive' | DELETE FROM `users` WHERE `docType` = "subscriber" AND status = "inactive" |
/* Primary key "1" */
{
"address" : {
"building" : "1007",
"coord" : [-73.856077, 40.848447],
"street" : "Morris Park Ave",
"zipcode" : "10462"
},
"borough" : "Bronx",
"cuisine" : "Bakery",
"grades" : [{
"date" : "2014-03-03T00:00:00Z",
"grade" : "A",
"score" : 2
}, {
"date" : "2013-09-11T00:00:00Z",
"grade" : "A",
"score" : 6
}, {
"date" : "2013-01-24T00:00:00Z",
"grade" : "A",
"score" : 10
}, {
"date" : "2011-11-23T00:00:00Z",
"grade" : "A",
"score" : 9
}, {
"date" : "2011-03-10T00:00:00Z",
"grade" : "B",
"score" : 14
}],
"name" : "Morris Park Bake Shop",
"restaurant_id" : "30075445"
}
SELECT [address.building], [address.street] FROM restaurantsWould return this resultset:
| address.building | addres.street |
| 1007 | Morris Park Ave |
SELECT [address.coord.0], [address.coord.1] FROM restaurantsWould return this resultset:
| address.coord.0 | address.coord.1 |
| -73.856077 | 40.838447 |
Note that array flattening should only be used in cases where you know the number of array items in advance, such as with "address.coord" which will always contain two items. For arrays like "grades" which can contain arbitrary numbers of items, consider using the child tables described in Automatic Schema Discovery instead, since they will allow you to read all of the values within the array.
User-defined functions are a new feature provided by Couchbase 7 and up. They can be used with the Cloud like normal functions but with a special naming convention for using scoped functions. Normally the Cloud requires that functions already exist before they are used, to define them refer to the Couchbase documentation on CREATE FUNCTION queries. These may be run at the Couchbase console or with the Cloud in QueryPassthrough mode.
Couchbase has support for both scalar functions as well as functions that return results from subqueries. The Cloud supports scalar functions within its SQL dialect but subquery functions can only be used when QueryPassthrough is enabled. The rest of this section covers the Cloud's SQL dialect and assums that QueryPassthrough is disabled.
In both N1QL and Analytics mode, global user-defined functions can be accessed using either their simple names or their qualified names.
The simple name is just the name of the function:
SELECT ageInYears(birthdate) FROM users
Global functions may also be invoked by qualifying them with the default namespace.
Qualified names are quoted names that contain internal separators, which by default is a period though this can be changed using the DataverseSeparator property.
In both N1QL and Analytics the global namespace is called Default:
SELECT [Default.ageInYears](birthdate) FROM users
Calling global functions using simple names is recommended. While the default qualfier is supported, its only intended use is for when a UDF clashes with a standard SQL function that the Cloud would otherwise translate.
Both N1QL and Analytics also allow functions to be defined outside of a global context.
In Analytics functions can be attached to both dataverses and scopes which are called using two-part and three-part names respectively.
In N1QL functions may only be attached to scopes so only three-part names may be used.
/* N1QL AND Analytics */ SELECT [socialNetwork.accounts.ageInYears](birthdate) FROM [socialNetwork.accounts.users] /* Analytics only */ SELECT [socailNetwork.ageInYears](birthdate) FROM [socialNetwork.accounts.users]
The Cloud can return JSON structures as column values. The Cloud enables you to use standard SQL functions to work with these JSON structures. The examples in this section use the following array:
[
{ "grade": "A", "score": 2 },
{ "grade": "A", "score": 6 },
{ "grade": "A", "score": 10 },
{ "grade": "A", "score": 9 },
{ "grade": "B", "score": 14 }
]
SELECT Name, JSON_EXTRACT(grades,'[0].grade') AS Grade, JSON_EXTRACT(grades,'[0].score') AS Score FROM Students;
| Column Name | Example Value |
| Grade | A |
| Score | 2 |
SELECT Name, JSON_COUNT(grades,'[x]') AS NumberOfGrades FROM Students;
| Column Name | Example Value |
| NumberOfGrades | 5 |
SELECT Name, JSON_SUM(score,'[x].score') AS TotalScore FROM Students;
| Column Name | Example Value |
| TotalScore | 41 |
SELECT Name, JSON_MIN(score,'[x].score') AS LowestScore FROM Students;
| Column Name | Example Value |
| LowestScore | 2 |
SELECT Name, JSON_MAX(score,'[x].score') AS HighestScore FROM Students;
| Column Name | Example Value |
| HighestScore | 14 |
SELECT [Document.Id], grade, score, DOCUMENT(*) FROM gradesFor example, that query would return:
| Document.Id | grade | score | DOCUMENT |
| 1 | A | 6 | {"document.id":1,"grade":"A","score":6} |
| 2 | A | 10 | {"document.id":1,"grade":"A","score":10} |
| 3 | A | 9 | {"document.id":1,"grade":"A","score":9} |
| 4 | B | 14 | {"document.id":1,"grade":"B","score":14} |
SELECT DOCUMENT(*) FROM gradesThis query would return:
| DOCUMENT | |
| {"grades":{"grade":"A","score":6"}} | |
| {"grades":{"grade":"A","score":10"}} | |
| {"grades":{"grade":"A","score":9"}} | |
| {"grades":{"grade":"B","score":14"}} |
In addition to Automatic Schema Discovery the Cloud also allows you to statically define the schema for your Couchbase object. Schemas are defined in text-based configuration files, which makes them easy to extend. You can call the CreateSchema stored procedure to generate a schema file; see Automatic Schema Discovery for more information.
Set the Location property to the file directory that will contain the schema file. The following sections show how to extend the resulting schema or write your own.
Let's consider the document below and extract out the nested properties as their own columns:
/* Primary key "1" */
{
"id": 12,
"name": "Lohia Manufacturers Inc.",
"homeaddress": {"street": "Main "Street", "city": "Chapel Hill", "state": "NC"},
"workaddress": {"street": "10th "Street", "city": "Chapel Hill", "state": "NC"}
"offices": ["Chapel Hill", "London", "New York"]
"annual_revenue": 35600000
}
/* Primary key "2" */
{
"id": 15,
"name": "Piago Industries",
"homeaddress": {street": "Main Street", "city": "San Francisco", "state": "CA"},
"workaddress": {street": "10th Street", "city": "San Francisco", "state": "CA"}
"offices": ["Durham", "San Francisco"]
"annual_revenue": 42600000
}
<rsb:info title="Customers" description="Customers" other:dataverse="" other:bucket=customers"" other:flavorexpr="" other:flavorvalue="" other:isarray="false" other:pathspec="" other:childpath="">
<attr name="document.id" xs:type="string" key="true" other:iskey="true" other:pathspec="" />
<attr name="annual_revenue" xs:type="integer" other:iskey="false" other:pathspec="" other:field="annual_revenue" />
<attr name="homeaddress.city" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.city" />
<attr name="homeaddress.state" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.state" />
<attr name="homeaddress.street" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.street" />
<attr name="name" xs:type="string" other:iskey="false" other:pathspec="" other:field="name" />
<attr name="id" xs:type="integer" other:iskey="false" other:pathspec="" other:field="id" />
<attr name="offices" xs:type="string" other:iskey="false" other:pathspec="" other:field="offices" />
<attr name="offices.0" xs:type="string" other:iskey="false" other:pathspec="[" other:field="offices.0" />
<attr name="offices.1" xs:type="string" other:iskey="false" other:pathspec="[" other:field="offices.1" />
<attr name="workaddress.city" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.city" />
<attr name="workaddress.state" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.state" />
<attr name="workaddress.street" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.street" />
</rsb:info>
In Custom Schema Example, you will find the complete schema that contains the example above.
| Property | Meaning |
| other:dataverse | The name of the dataverse the dataset belongs to. Empty if not an Analytics view. |
| other:bucket | The name of the bucket or dataset within Couchbase |
| other:flavorexpr | The URL encoded condition in a flavored table. For example, "%60docType%60%20%3D%20%22chess%22". |
| other:flavorvalue | The name of the flavor in a flavored table. For example, "chess". |
| other:isarray | Whether the table is an array child table. |
| other:pathspec | This is used to interpret the separators within other:childpath. See Column Properties for more details. |
| other:childpath | The path to the attribute that is used to UNNEST the child table. Empty if not a child table. |
| Property | Meaning |
| name | Required. The name of the column, lower-cased. |
| key | Used to mark the primary key. Required for Document.Id but optional for other columns. |
| xs:type | Required. The type of the column within the Cloud. |
| other:iskey | Required. Must be the same value as key, or "false" if key is not included. |
| other:pathspec | Required. This is used to interpret the separators within other:field. |
| other:field | Required. The path to the field in Couchbase. |
{
"numeric_object": {
"0": 0
},
"array": [
0
]
}
To ensure that the Cloud can distinguish between field and array accesses, the pathspec is used to determine whether each "." in the field is an array or an object. Each "{" represents a field access, while each "[" represents an array access.
For example, with a field of "a.0.b.1" and a "pathspec" of "[{[", the N1QL expression "a[0].b[1]" would be generated. If instead the "pathspec" were "{{{", then the N1QL expression "a.`0`.b.`1`" would be generated.
This section contains a complete schema. Set the Location property to the file directory that will contain the schema file. The info section enables a relational view of a Couchbase object. For more details, see Custom Schema Definitions. The table below allows the SELECT, INSERT, UPDATE, and DELETE commands as implemented in the GET, POST, MERGE, and DELETE sections of the schema below. The operations, such as couchbaseadoSysData, are internal implementations.
<rsb:script xmlns:rsb="http://www.rssbus.com/ns/rsbscript/2">
<rsb:info title="Customers" description="Customers" other:dataverse="" other:bucket=customers"" other:flavorexpr="" other:flavorvalue="" other:isarray="false" other:pathspec="" other:childpath="">
<attr name="document.id" xs:type="string" key="true" other:iskey="true" other:pathspec="" />
<attr name="annual_revenue" xs:type="integer" other:iskey="false" other:pathspec="" other:field="annual_revenue" />
<attr name="homeaddress.city" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.city" />
<attr name="homeaddress.state" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.state" />
<attr name="homeaddress.street" xs:type="string" other:iskey="false" other:pathspec="{" other:field="homeaddress.street" />
<attr name="name" xs:type="string" other:iskey="false" other:pathspec="" other:field="name" />
<attr name="id" xs:type="integer" other:iskey="false" other:pathspec="" other:field="id" />
<attr name="offices" xs:type="string" other:iskey="false" other:pathspec="" other:field="offices" />
<attr name="offices.0" xs:type="string" other:iskey="false" other:pathspec="[" other:field="offices.0" />
<attr name="offices.1" xs:type="string" other:iskey="false" other:pathspec="[" other:field="offices.1" />
<attr name="workaddress.city" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.city" />
<attr name="workaddress.state" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.state" />
<attr name="workaddress.street" xs:type="string" other:iskey="false" other:pathspec="{" other:field="workaddress.street" />
</rsb:info>
</rsb:script>
By default, the Cloud attempts to negotiate TLS with the server. The server certificate is validated against the default system trusted certificate store. You can override how the certificate gets validated using the SSLServerCert connection property.
To specify another certificate, see the SSLServerCert connection property.
The Couchbase Cloud also supports setting client certificates. Set the following to connect using a client certificate.
To authenticate to an HTTP proxy, set the following:
Set the following properties:
Depending upon the connection settings being used, the Cloud 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.
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 Cloud data model.
Couchbase has different ways of grouping buckets and datasets depending on the CouchbaseService and version of Couchbase you are connecting to:
All of the schemas provided by the Cloud are dynamically retrieved from Couchbase, so any changes in the buckets or fields within Couchbase will be reflected in the Cloud the next time you connect.
You may also issue a reset query to refresh schemas without having to close the connection:
RESET SCHEMA CACHE
Stored procedures are function-like interfaces that extend the functionality of the Cloud beyond simple SELECT/INSERT/UPDATE/DELETE operations with Couchbase.
Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from Couchbase, along with an indication of whether the procedure succeeded or failed.
| Name | Description |
| AddDocument | Upsert entire JSON documents to Couchbase as-is. |
| CreateBucket | Creates a new bucket in CouchBase. |
| CreateCollection | Creates a collection under an existing scope |
| CreateScope | Creates a scope under an existing bucket |
| CreateSearchIndex | Creates a search index with the Search Service API in Couchbase. |
| CreateUserTable | An internal operation used when GenerateSchemaFiles=OnCreate |
| DeleteBucket | Deletes a bucket (and all its collections and scopes, where supported) |
| DeleteCollection | Deletes a collection (Couchbase 7 and up) |
| DeleteScope | Deletes a scope and all its collections (Couchbase 7 and up) |
| ExecuteSearchIndex | Execute a search on an index using the Search Service API in Couchbase. |
| FlushBucket | Removes all documents from a bucket in Couchbase. |
| ListIndices | Lists all indices available in Couchbase |
| ManageIndices | Creates/Drops an index in a target bucket in Couchbase. |
Upsert entire JSON documents to Couchbase as-is.
| Name | Type | Required | Description |
| BucketName | String | True | The bucket to insert the document into. |
| SourceTable | String | False | The name of the temp table containing ID and Document columns. Required if no ID is specified. |
| ID | String | False | The primary key to insert the document under. Required if no SourceTable is specified. |
| Document | String | False | The JSON text of the document to insert. Required if not SourceTable is specified. |
| Name | Type | Description |
| RowsAffected | String | The number of rows successfully updated |
Creates a new bucket in CouchBase.
Buckets using @AuthType 'none' can be created by specifying only the @Name, @AuthType, @BucketType, and @RamQuotaMB. The @ProxyPort option may also be required, depending upon what version of Couchbase you are connecting to.
EXECUTE CreateBucket @Name = 'Players', @AuthType = 'NONE', @BucketType = 'COUCHBASE', @RamQuotaMB = 100, @ProxyPort = 1234
When creating a bucket with @AuthType 'sasl', the @ProxyPort must not be provided, and the @SaslPassword is optional:
EXECUTE CreateBucket @Name = 'Players', @AuthType = 'SASL', @BucketType = 'COUCHBASE', @RamQuotaMB = 100
All other parameters can be used regardless of what @AuthType you provide.
| Name | Type | Required | Description |
| Name | String | True | The name of the bucket to create. |
| AuthType | String | True | The type of authentication to use can be sasl or none. |
| BucketType | String | True | The type of the bucket, can be memcached or couchbase. |
| EvictionPolicy | String | False | What to evict from the cache if the bucket is full, can be fullEviction or valueOnly |
| FlushEnabled | String | False | Enables or disables flush all support, can be 0 or 1. |
| ParallelDBAndViewCompaction | String | False | Enables simultaneous compactions of the database and the views, can be true or false. |
| ProxyPort | String | False | The proxy port, must be unused, required if authorization is not SASL. |
| RamQuotaMB | String | True | The amount of RAM to allocate to the bucket, in megabytes. |
| ReplicaIndex | String | False | Enables or disables replicate indexes, can be 1 or 0. |
| ReplicaNumber | String | False | A number between 0 and 3, specifies number of replicas. |
| SaslPassword | String | False | SASL password, may be provided if the authentication type is SASL. |
| ThreadsNumber | String | False | A number between 2 and 8, specifies number of concurrent readers/writers. |
| CompressionMode | String | False | Either Off (no compression), Passive (documents inserted compressed stay comressed) or Active (server can compress any document). On Couchbase Enterprise, Passive is the default. |
| ConflictResolutionType | String | False | How the server will resolve conflicts between cluster nodes. Either lww (timestamp-based resolution) or seqno (revision ID-based resolution). Defaults to seqno on Couchbase Enterprise. |
| Name | Type | Description |
| Success | String | Whether or not the bucket was successfully created. |
Creates a collection under an existing scope
| Name | Type | Required | Description |
| Bucket | String | True | The name of the bucket containing the collection. |
| Scope | String | True | The name of the scope containing the collection. |
| Name | String | True | The name of the collection to create. |
| Name | Type | Description |
| Success | Bool | Whether or not the collection was successfully created. |
Creates a scope under an existing bucket
| Name | Type | Required | Description |
| Bucket | String | True | The name of the bucket containing the scope. |
| Name | String | True | The name of the scope to create. |
| Name | Type | Description |
| Success | Bool | Whether or not the scope was successfully created. |
Creates a search index with the Search Service API in Couchbase.
| Name | Type | Required | Description |
| SearchIndexName | String | True | The Name of the search Index. |
| SearchIndex | String | True | The JSON text of the document to insert. Required if not SourceTable is specified. |
| Name | Type | Description |
| Success | String | Whether or not the index was successfully created or dropped. |
An internal operation used when GenerateSchemaFiles=OnCreate
This stored procedure is an internal operation that gets executed when running CREATE TABLE statements and GenerateSchemaFiles is set to OnCreate.
Note: This procedure makes use of indexed parameters. Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.
Suppose there is an input parameter named Param#. To input multiple instances of an indexed parameter like this, execute:
EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"
In the table below, indexed parameters are denoted with a '#' character at the end of their names.
| Name | Type | Required | Description |
| CreateNotExist | String | False | Whether an existing table is an error or not |
| TableName | String | False | The name of the table to create |
| ColumnNames# | String | False | For each column, its name |
| ColumnDataTypes# | String | False | For each column, its type |
| ColumnSizes# | String | False | For each column, its size (ignored) |
| ColumnScales# | String | False | For each column, its scale (ignored) |
| ColumnIsNulls# | String | False | For each column, whether it allows NULLs (ignored) |
| ColumnDefaults# | String | False | For each column, its default value (ignored) |
| Location | String | False | Where the schema file is generated |
| Name | Type | Description |
| AffectedTables | String | The number of tables created, either 0 or 1 |
Deletes a bucket (and all its collections and scopes, where supported)
| Name | Type | Required | Description |
| Name | String | True | The name of the bucket to delete. |
| Name | Type | Description |
| Success | Bool | Whether or not the bucket was successfully deleted. |
Deletes a collection (Couchbase 7 and up)
| Name | Type | Required | Description |
| Bucket | String | True | The name of the bucket containing the collection. |
| Scope | String | True | The name of the scope containing the collection. |
| Name | String | True | The name of the collection to delete. |
| Name | Type | Description |
| Success | Bool | Whether or not the collection was successfully deleted. |
Deletes a scope and all its collections (Couchbase 7 and up)
| Name | Type | Required | Description |
| Bucket | String | True | The name of the bucket containing the scope. |
| Name | String | True | The name of the scope to delete. |
| Name | Type | Description |
| Success | Bool | Whether or not the scope was successfully deleted. |
Execute a search on an index using the Search Service API in Couchbase.
| Name | Type | Required | Description |
| SearchIndexName | String | True | The Name of the search Index. |
| QueryRequest | String | True | The JSON text of the document to insert. Required if not SourceTable is specified. |
| Name | Type | Description |
| Success | String | Whether or not the index was successfully created or dropped. |
Removes all documents from a bucket in Couchbase.
| Name | Type | Required | Description |
| Name | String | True | The name of the bucket to delete. Flush must be enabled on this bucket. |
| Name | Type | Description |
| Success | Bool | Whether or not the bucket was successfully flushed. |
Lists all indices available in Couchbase
| Name | Type | Description |
| Id | String | The unique index ID |
| Datastore_id | String | The server hosting the indexed bucket |
| Namespace_id | String | The pool hosting the indexed bucket |
| Bucket_id | String | The bucket the index applies to if the index applies to a collection (Couchbase 7 and up). NULL otherwise. |
| Scope_id | String | The scope the index applies to if the index applies to a collection (Couchbase 7 and up). NULL otherwise. |
| Keyspace_id | String | The collection the index applies to, if the index applis to a collection (Couchbase 7 and up). The bucket the index applies to otherwise. |
| Index_key | String | A list of keys participating in the index |
| Condition | String | The N1QL filter that the index applies to |
| Is_primary | String | Whether the index is on the primary key |
| Name | String | The name of the index |
| State | String | Whether the index is available |
| Using | String | Whether the index is backed by GSI or a view |
Creates/Drops an index in a target bucket in Couchbase.
An anonymous primary index can be created with these parameters:
EXECUTE ManageIndices @BucketName = 'Players' @Action = 'CREATE' @IsPrimary = 'true' @IndexType = 'VIEW'
This is the same as executing this N1QL:
CREATE PRIMARY INDEX ON `Players` USING VIEW
A named primary index can be created by specifying an @Name, in addition to the parameters listed above:
EXECUTE ManageIndices @BucketName = 'Players' @Action = 'CREATE' @IsPrimary = 'true' @Name = 'Players_primary' @IndexType = 'VIEW'
A secondary index can be created by setting @IsPrimary to false and providing at least one expression.
EXECUTE ManageIndices @BucketName = 'Players', @Action = 'CREATE', @IsPrimary = 'false', @Name = 'Players_playtime_score', @Expressions = '["score", "playtime"]'
This is the same as running the following N1QL:
CREATE INDEX `Players_playtime_score` ON `Players`(score, playtime) USING GSI;
Multiple nodes and filters can also be provied to generate more complex indices. They must be provided as JSON lists:
EXECUTE ManageIndices @BucketName = 'Players', @Name = 'TopPlayers', @Expressions = '["score", "playtime"]', @Filter = '["topscore > 1000", "playtime > 600"]', @Nodes = '["127.0.0.1:8091", "192.168.0.100:8091"]'
This is the same as running the following N1QL:
CREATE INDEX `TopPlayers` ON `Players`(score, playtime) WHERE topscore > 1000 AND playtime > 600 USING GSI WITH { "nodes": ["127.0.0.1:8091", "192.168.0.100:8091"]};
| Name | Type | Required | Description |
| BucketName | String | True | The target bucket to create or drop the the index from. |
| ScopeName | String | False | The target scope to create or drop the index from (Couchbase 7 and up) |
| CollectionName | String | False | The target collection to create or drop the index from (Couchbase 7 and up) |
| Action | String | True | Specifies which action to perform on the index, can be Create or Drop. |
| Expressions | String | False | A list of expressions or functions, encoded as JSON, that the index will be based off of. At least one is required if IsPrimary is set to false and the action is Create. |
| Name | String | False | The name of the index to create or drop, required if IsPrimary is set to false. |
| IsPrimary | String | False | Specifies wether the index should be a primary index.
The default value is true. |
| Filters | String | False | A list of filters, encoded as JSON, to apply on the index. |
| IndexType | String | False | The type of index to create, can be GSI or View, only used if the action is Create.
The default value is GSI. |
| ViewName | String | False | Deprecated, included for compatibility only. Does nothing. |
| Nodes | String | False | A list, encoded as JSON, of nodes to contain the index, must contain the port. Only used if the action is Create. |
| NumReplica | String | False | How many replicas to create among the index nodes in the cluster. |
| Name | Type | Description |
| Success | String | Whether or not the index was successfully created or dropped. |
You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.
The following tables return database metadata for Couchbase:
The following tables return information about how to connect to and query the data source:
The following table returns query statistics for data modification queries:
Lists the available databases.
The following query retrieves all databases determined by the connection string:
SELECT * FROM sys_catalogs
| Name | Type | Description |
| CatalogName | String | The database name. |
Lists the available schemas.
The following query retrieves all available schemas:
SELECT * FROM sys_schemas
| Name | Type | Description |
| CatalogName | String | The database name. |
| SchemaName | String | The schema name. |
Lists the available tables.
The following query retrieves the available tables and views:
SELECT * FROM sys_tables
| Name | Type | Description |
| CatalogName | String | The database containing the table or view. |
| SchemaName | String | The schema containing the table or view. |
| TableName | String | The name of the table or view. |
| TableType | String | The table type (table or view). |
| Description | String | A description of the table or view. |
| IsUpdateable | Boolean | Whether the table can be updated. |
Describes the columns of the available tables and views.
The following query returns the columns and data types for the [MyBucket].[MyScope].[Customer] table:
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='[MyBucket].[MyScope].[Customer]'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the table or view. |
| SchemaName | String | The schema containing the table or view. |
| TableName | String | The name of the table or view containing the column. |
| ColumnName | String | The column name. |
| DataTypeName | String | The data type name. |
| DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
| Length | Int32 | The storage size of the column. |
| DisplaySize | Int32 | The designated column's normal maximum width in characters. |
| NumericPrecision | Int32 | The maximum number of digits in numeric data. The column length in characters for character and date-time data. |
| NumericScale | Int32 | The column scale or number of digits to the right of the decimal point. |
| IsNullable | Boolean | Whether the column can contain null. |
| Description | String | A brief description of the column. |
| Ordinal | Int32 | The sequence number of the column. |
| IsAutoIncrement | String | Whether the column value is assigned in fixed increments. |
| IsGeneratedColumn | String | Whether the column is generated. |
| IsHidden | Boolean | Whether the column is hidden. |
| IsArray | Boolean | Whether the column is an array. |
| IsReadOnly | Boolean | Whether the column is read-only. |
| IsKey | Boolean | Indicates whether a field returned from sys_tablecolumns is the primary key of the table. |
| ColumnType | String | The role or classification of the column in the schema. Possible values include SYSTEM, LINKEDCOLUMN, NAVIGATIONKEY, REFERENCECOLUMN, and NAVIGATIONPARENTCOLUMN. |
Lists the available stored procedures.
The following query retrieves the available stored procedures:
SELECT * FROM sys_procedures
| Name | Type | Description |
| CatalogName | String | The database containing the stored procedure. |
| SchemaName | String | The schema containing the stored procedure. |
| ProcedureName | String | The name of the stored procedure. |
| Description | String | A description of the stored procedure. |
| ProcedureType | String | The type of the procedure, such as PROCEDURE or FUNCTION. |
Describes stored procedure parameters.
The following query returns information about all of the input parameters for the SelectEntries stored procedure:
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'SelectEntries' AND Direction = 1 OR Direction = 2
To include result set columns in addition to the parameters, set the IncludeResultColumns pseudo column to True:
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'SelectEntries' AND IncludeResultColumns='True'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the stored procedure. |
| SchemaName | String | The name of the schema containing the stored procedure. |
| ProcedureName | String | The name of the stored procedure containing the parameter. |
| ColumnName | String | The name of the stored procedure parameter. |
| Direction | Int32 | An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters. |
| DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
| DataTypeName | String | The name of the data type. |
| NumericPrecision | Int32 | The maximum precision for numeric data. The column length in characters for character and date-time data. |
| Length | Int32 | The number of characters allowed for character data. The number of digits allowed for numeric data. |
| NumericScale | Int32 | The number of digits to the right of the decimal point in numeric data. |
| IsNullable | Boolean | Whether the parameter can contain null. |
| IsRequired | Boolean | Whether the parameter is required for execution of the procedure. |
| IsArray | Boolean | Whether the parameter is an array. |
| Description | String | The description of the parameter. |
| Ordinal | Int32 | The index of the parameter. |
| Values | String | The values you can set in this parameter are limited to those shown in this column. Possible values are comma-separated. |
| SupportsStreams | Boolean | Whether the parameter represents a file that you can pass as either a file path or a stream. |
| IsPath | Boolean | Whether the parameter is a target path for a schema creation operation. |
| Default | String | The value used for this parameter when no value is specified. |
| SpecificName | String | A label that, when multiple stored procedures have the same name, uniquely identifies each identically-named stored procedure. If there's only one procedure with a given name, its name is simply reflected here. |
| IsCDataProvided | Boolean | Whether the procedure is added/implemented by CData, as opposed to being a native Couchbase procedure. |
| Name | Type | Description |
| IncludeResultColumns | Boolean | Whether the output should include columns from the result set in addition to parameters. Defaults to False. |
Describes the primary and foreign keys.
The following query retrieves the primary key for the [MyBucket].[MyScope].[Customer] table:
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='[MyBucket].[MyScope].[Customer]'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| IsKey | Boolean | Whether the column is a primary key in the table referenced in the TableName field. |
| IsForeignKey | Boolean | Whether the column is a foreign key referenced in the TableName field. |
| PrimaryKeyName | String | The name of the primary key. |
| ForeignKeyName | String | The name of the foreign key. |
| ReferencedCatalogName | String | The database containing the primary key. |
| ReferencedSchemaName | String | The schema containing the primary key. |
| ReferencedTableName | String | The table containing the primary key. |
| ReferencedColumnName | String | The column name of the primary key. |
Describes the foreign keys.
The following query retrieves all foreign keys which refer to other tables:
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| PrimaryKeyName | String | The name of the primary key. |
| ForeignKeyName | String | The name of the foreign key. |
| ReferencedCatalogName | String | The database containing the primary key. |
| ReferencedSchemaName | String | The schema containing the primary key. |
| ReferencedTableName | String | The table containing the primary key. |
| ReferencedColumnName | String | The column name of the primary key. |
| ForeignKeyType | String | Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key. |
Describes the primary keys.
The following query retrieves the primary keys from all tables and views:
SELECT * FROM sys_primarykeys
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| KeySeq | String | The sequence number of the primary key. |
| KeyName | String | The name of the primary key. |
Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.
The following query retrieves all indexes that are not primary keys:
SELECT * FROM sys_indexes WHERE IsPrimary='false'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the index. |
| SchemaName | String | The name of the schema containing the index. |
| TableName | String | The name of the table containing the index. |
| IndexName | String | The index name. |
| ColumnName | String | The name of the column associated with the index. |
| IsUnique | Boolean | True if the index is unique. False otherwise. |
| IsPrimary | Boolean | True if the index is a primary key. False otherwise. |
| Type | Int16 | An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3). |
| SortOrder | String | The sort order: A for ascending or D for descending. |
| OrdinalPosition | Int16 | The sequence number of the column in the index. |
Returns information on the available connection properties and those set in the connection string.
The following query retrieves all connection properties that have been set in the connection string or set through a default value:
SELECT * FROM sys_connection_props WHERE Value <> ''
| Name | Type | Description |
| Name | String | The name of the connection property. |
| ShortDescription | String | A brief description. |
| Type | String | The data type of the connection property. |
| Default | String | The default value if one is not explicitly set. |
| Values | String | A comma-separated list of possible values. A validation error is thrown if another value is specified. |
| Value | String | The value you set or a preconfigured default. |
| Required | Boolean | Whether the property is required to connect. |
| Category | String | The category of the connection property. |
| IsSessionProperty | String | Whether the property is a session property, used to save information about the current connection. |
| Sensitivity | String | The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms. |
| PropertyName | String | A camel-cased truncated form of the connection property name. |
| Ordinal | Int32 | The index of the parameter. |
| CatOrdinal | Int32 | The index of the parameter category. |
| Hierarchy | String | Shows dependent properties associated that need to be set alongside this one. |
| Visible | Boolean | Informs whether the property is visible in the connection UI. |
| ETC | String | Various miscellaneous information about the property. |
Describes the SELECT query processing that the Cloud can offload to the data source.
See SQL Compliance for SQL syntax details.
Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.
| Name | Description | Possible Values |
| AGGREGATE_FUNCTIONS | Supported aggregation functions. | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
| COUNT | Whether COUNT function is supported. | YES, NO |
| IDENTIFIER_QUOTE_OPEN_CHAR | The opening character used to escape an identifier. | [ |
| IDENTIFIER_QUOTE_CLOSE_CHAR | The closing character used to escape an identifier. | ] |
| SUPPORTED_OPERATORS | A list of supported SQL operators. | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
| GROUP_BY | Whether GROUP BY is supported, and, if so, the degree of support. | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
| OJ_CAPABILITIES | The supported varieties of outer joins supported. | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
| OUTER_JOINS | Whether outer joins are supported. | YES, NO |
| SUBQUERIES | Whether subqueries are supported, and, if so, the degree of support. | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
| STRING_FUNCTIONS | Supported string functions. | LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE |
| NUMERIC_FUNCTIONS | Supported numeric functions. | ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE |
| TIMEDATE_FUNCTIONS | Supported date/time functions. | NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT |
| REPLICATION_SKIP_TABLES | Indicates tables skipped during replication. | |
| REPLICATION_TIMECHECK_COLUMNS | A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication. | |
| IDENTIFIER_PATTERN | String value indicating what string is valid for an identifier. | |
| SUPPORT_TRANSACTION | Indicates if the provider supports transactions such as commit and rollback. | YES, NO |
| DIALECT | Indicates the SQL dialect to use. | |
| KEY_PROPERTIES | Indicates the properties which identify the uniform database. | |
| SUPPORTS_MULTIPLE_SCHEMAS | Indicates if multiple schemas may exist for the provider. | YES, NO |
| SUPPORTS_MULTIPLE_CATALOGS | Indicates if multiple catalogs may exist for the provider. | YES, NO |
| DATASYNCVERSION | The CData Data Sync version needed to access this driver. | Standard, Starter, Professional, Enterprise |
| DATASYNCCATEGORY | The CData Data Sync category of this driver. | Source, Destination, Cloud Destination |
| SUPPORTSENHANCEDSQL | Whether enhanced SQL functionality beyond what is offered by the API is supported. | TRUE, FALSE |
| SUPPORTS_BATCH_OPERATIONS | Whether batch operations are supported. | YES, NO |
| SQL_CAP | All supported SQL capabilities for this driver. | SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX |
| PREFERRED_CACHE_OPTIONS | A string value specifies the preferred cacheOptions. | |
| ENABLE_EF_ADVANCED_QUERY | Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. | YES, NO |
| PSEUDO_COLUMNS | A string array indicating the available pseudo columns. | |
| MERGE_ALWAYS | If the value is true, The Merge Mode is forcibly executed in Data Sync. | TRUE, FALSE |
| REPLICATION_MIN_DATE_QUERY | A select query to return the replicate start datetime. | |
| REPLICATION_MIN_FUNCTION | Allows a provider to specify the formula name to use for executing a server side min. | |
| REPLICATION_START_DATE | Allows a provider to specify a replicate startdate. | |
| REPLICATION_MAX_DATE_QUERY | A select query to return the replicate end datetime. | |
| REPLICATION_MAX_FUNCTION | Allows a provider to specify the formula name to use for executing a server side max. | |
| IGNORE_INTERVALS_ON_INITIAL_REPLICATE | A list of tables which will skip dividing the replicate into chunks on the initial replicate. | |
| CHECKCACHE_USE_PARENTID | Indicates whether the CheckCache statement should be done against the parent key column. | TRUE, FALSE |
| CREATE_SCHEMA_PROCEDURES | Indicates stored procedures that can be used for generating schema files. |
The following query retrieves the operators that can be used in the WHERE clause:
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.
| Name | Type | Description |
| NAME | String | A component of SQL syntax, or a capability that can be processed on the server. |
| VALUE | String | Detail on the supported SQL or SQL syntax. |
Returns information about attempted modifications.
The following query retrieves the Ids of the modified rows in a batch operation:
SELECT * FROM sys_identity
| Name | Type | Description |
| Id | String | The database-generated Id returned from a data modification operation. |
| Batch | String | An identifier for the batch. 1 for a single operation. |
| Operation | String | The result of the operation in the batch: INSERTED, UPDATED, or DELETED. |
| Message | String | SUCCESS or an error message if the update in the batch failed. |
Describes the available system information.
The following query retrieves all columns:
SELECT * FROM sys_information
| Name | Type | Description |
| Product | String | The name of the product. |
| Version | String | The version number of the product. |
| Datasource | String | The name of the datasource the product connects to. |
| NodeId | String | The unique identifier of the machine where the product is installed. |
| HelpURL | String | The URL to the product's help documentation. |
| License | String | The license information for the product. (If this information is not available, the field may be left blank or marked as 'N/A'.) |
| Location | String | The file path location where the product's library is stored. |
| Environment | String | The version of the environment or rumtine the product is currently running under. |
| DataSyncVersion | String | The tier of CData Sync required to use this connector. |
| DataSyncCategory | String | The category of CData Sync functionality (e.g., Source, Destination). |
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.
For more information on establishing a connection, see Establishing a Connection.
| Property | Description |
| AuthScheme | The type of authentication to use when connecting to Couchbase. |
| User | Specifies the authenticating user's user ID. |
| Password | Specifies the authenticating user's password. |
| Server | The address of the Couchbase server or servers to which you are connecting. |
| CouchbaseService | Determines the Couchbase service to connect to. Default is N1QL. Available options are N1QL and Analytics. |
| ConnectionMode | Determines how to connect to the Couchbase server. Must be either Direct or Cloud. |
| DNSServer | Determines what DNS server to use when retrieving Couchbase Capella information. |
| N1QLPort | The port or URL for connecting to the Couchbase N1QL Endpoint. |
| AnalyticsPort | The port or URL for connecting to the Couchbase Analytics Endpoint. |
| WebConsolePort | The port or URL for connecting to the Couchbase Web Console. |
| SearchPort | The port or URL for connecting to the Couchbase Search Service Endpoint. |
| Property | Description |
| SSLClientCert | Specifies the TLS/SSL client certificate store for SSL Client Authentication (2-way SSL). This property works in conjunction with other SSL-related properties to establish a secure connection. |
| SSLClientCertType | Specifies the type of key store containing the TLS/SSL client certificate for SSL Client Authentication. Choose from a variety of key store formats depending on your platform and certificate source. |
| SSLClientCertPassword | Specifes the password required to access the TLS/SSL client certificate store. Use this property if the selected certificate store type requires a password for access. |
| SSLClientCertSubject | Specifes the subject of the TLS/SSL client certificate to locate it in the certificate store. Use a comma-separated list of distinguished name fields, such as CN=www.server.com, C=US. The wildcard * selects the first certificate in the store. |
| UseSSL | Whether to negotiate TLS/SSL when connecting to the Couchbase server. |
| SSLServerCert | Specifies the certificate to be accepted from the server when connecting using TLS/SSL. |
| Property | Description |
| Verbosity | Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5. |
| Property | Description |
| BrowsableSchemas | Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC . |
| Dataverse | Which Analytics dataverse to scan when discovering tables. |
| TypeDetectionScheme | Determines how the provider builds tables and columns from the buckets found in Couchbase. |
| InferNumSampleValues | The maximum number of values for every field to scan before determining its data type. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| InferSampleSize | The maximum number of documents to scan for the columns available in the bucket. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| InferSimilarityMetric | Specifies the similarity degree where different schemas will be considered to be the same flavor. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| FlexibleSchemas | Whether the provider allows queries to use columns that it has not discovered. |
| ExposeTTL | Specifies whether document TTL information should be exposed. |
| NumericStrings | Whether to allow string values to be treated as numbers. |
| IgnoreChildAggregates | Whether the provider exposes aggregate columns that are also available as child tables. Ignored if TableSupport is not set to Full. |
| TableSupport | How much effort the provider will put into discovering tables on the Couchbase server. |
| NewChildJoinsMode | Determines the kind of child table model the provider exposes. |
| Property | Description |
| ChildSeparator | The character or characters used to denote child tables. |
| CreateTableRamQuota | The default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax. |
| DataverseSeparator | The character or characters used to denote Analytics dataverses and scopes/collections. |
| FlattenArrays | The number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled. |
| FlattenObjects | Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, objects nested in arrays are returned as strings of JSON. |
| FlavorSeparator | The character or characters used to denote flavors. |
| InsertNullValues | Determines whether an INSERT should include fields that have NULL values. |
| MaxRows | Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY. |
| Pagesize | Specifies the maximum number of records per page the provider returns when requesting data from Couchbase. |
| PeriodsSeparator | The character or characters used to denote hierarchy. |
| PseudoColumns | Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'. |
| QueryExecutionTimeout | This sets the server-side timeout for the query, which governs how long Couchbase will execute the query before returning a timeout error. |
| RowScanDepth | The maximum number of rows to scan to look for the columns available in a table. |
| StrictComparison | Adjusts how precisely to translate filters on SQL input queries into Couchbase queries. This can be set to a comma-separated list of values, where each value can be one of: date, number, boolean, or string. |
| Timeout | Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. |
| TransactionDurability | Specifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries. |
| TransactionTimeout | This sets the amount of time a transaction may execute before it is timed out by Couchbase. |
| UpdateNullValues | Determines whether an UPDATE writes NULL values as NULL, or removes them. |
| UseCollectionsForDDL | Whether to assume that CREATE TABLE statements use collections instead of flavors. Only takes effect when connecting to Couchbase v7+ and GenerateSchemaFiles is set to OnCreate. |
| UseTransactions | Specifies whether to use N1QL transactions when executing queries. |
This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.
| Property | Description |
| AuthScheme | The type of authentication to use when connecting to Couchbase. |
| User | Specifies the authenticating user's user ID. |
| Password | Specifies the authenticating user's password. |
| Server | The address of the Couchbase server or servers to which you are connecting. |
| CouchbaseService | Determines the Couchbase service to connect to. Default is N1QL. Available options are N1QL and Analytics. |
| ConnectionMode | Determines how to connect to the Couchbase server. Must be either Direct or Cloud. |
| DNSServer | Determines what DNS server to use when retrieving Couchbase Capella information. |
| N1QLPort | The port or URL for connecting to the Couchbase N1QL Endpoint. |
| AnalyticsPort | The port or URL for connecting to the Couchbase Analytics Endpoint. |
| WebConsolePort | The port or URL for connecting to the Couchbase Web Console. |
| SearchPort | The port or URL for connecting to the Couchbase Search Service Endpoint. |
The type of authentication to use when connecting to Couchbase.
string
"Basic"
Note that only Basic authentication is supported when using the "Cloud" ConnectionMode.
Specifies the authenticating user's user ID.
string
""
The authenticating server requires both User and Password to validate the user's identity.
Specifies the authenticating user's password.
string
""
The authenticating server requires both User and Password to validate the user's identity.
The address of the Couchbase server or servers to which you are connecting.
string
""
This value can be set to a hostname or an IP address, like "couchbase-server.com" or "1.2.3.4". It can also be set to an HTTP or HTTPS URL, such as "https://couchbase-server.com" or "http://1.2.3.4". If ConnectionMode is set to Cloud then this should be the hostname of the Couchbase Cloud instance as reported in the control panel.
If the URL form is used, then setting this option will also set the UseSSL option: if the URL scheme is "https://", then UseSSL will be set to true, and a URL with "http://" will set UseSSL to false.
A port value cannot be used as part of this option, so values like "http://couchbase-server.com:8093" are not allowed. Please use WebConsolePort, N1QLPort and AnalyticsPort.
This value can also accept multiple servers in the above format separated by commas, such as "1.2.3.4, couchbase-server.com". This will allow the Cloud to recover the connection in case some of the servers listed are inaccessible.
Note that while the Cloud will try to recover the connection as a whole, it may lose individual operations. For example, while a long-running query will fail if the server becomes inaccesssible while that query is running, that query can be retried on the same connection and the Cloud will execute it on the next active server.
Determines the Couchbase service to connect to. Default is N1QL. Available options are N1QL and Analytics.
string
"N1QL"
Determines the Couchbase service to connect to. Default is N1QL. Available options are N1QL and Analytics
Determines how to connect to the Couchbase server. Must be either Direct or Cloud.
string
"Cloud"
By default the Cloud connects to Couchbase directly using the address given in the Server option. The Server must be running the appropriate CouchbaseService to accept the connection. This will work in most on-premise or basic cloud deployments.
This should be set to Cloud when connecting to Couchbase Capella or a custom deployment that uses service records. These records will allow the Cloud to determine the exact Couchbase servers that provide the appropriate CouchbaseService. You must also set the DNSServer property so that the Cloud is able to fetch these service records.
Note that enabling Cloud mode will override these connection properties with the values discovered by contacting the cluster:
Determines what DNS server to use when retrieving Couchbase Capella information.
string
"8.8.8.8"
In most cases any public DNS server can be provided here such as the ones provided by OpenDNS, Cloudflare or Google.
If these are not accessible then you will need to use the DNS server configured by your network administrator. You can also provide a port if needed: DNSServer=10.1.2.3:5300
The port or URL for connecting to the Couchbase N1QL Endpoint.
string
""
This port is used for submitting queries when CouchbaseService is set to N1QL. Any requests to manage indices will also go through this port. It defaults to 8093 when not using SSL, and 18093 when using SSL. See UseSSL.
This option can be set one of two ways:
The port or URL for connecting to the Couchbase Analytics Endpoint.
string
""
This port is used for submitting queries when CouchbaseService is set to Analytics. It defaults to 8095 when not using SSL, and 18095 when using SSL. See UseSSL.
This option can be set one of two ways:
The port or URL for connecting to the Couchbase Web Console.
string
""
This port is used for API operations like managing buckets. It defaults to 8091 when not using SSL, and 18091 when using SSL. See UseSSL.
This option can be set one of two ways:
The port or URL for connecting to the Couchbase Search Service Endpoint.
string
""
This port is used for submitting queries when CouchbaseService is set to Search Service. It defaults to 8094 when not using SSL, and 18094 when using SSL. See UseSSL.
This option can be set one of two ways:
This section provides a complete list of the SSL properties you can configure in the connection string for this provider.
| Property | Description |
| SSLClientCert | Specifies the TLS/SSL client certificate store for SSL Client Authentication (2-way SSL). This property works in conjunction with other SSL-related properties to establish a secure connection. |
| SSLClientCertType | Specifies the type of key store containing the TLS/SSL client certificate for SSL Client Authentication. Choose from a variety of key store formats depending on your platform and certificate source. |
| SSLClientCertPassword | Specifes the password required to access the TLS/SSL client certificate store. Use this property if the selected certificate store type requires a password for access. |
| SSLClientCertSubject | Specifes the subject of the TLS/SSL client certificate to locate it in the certificate store. Use a comma-separated list of distinguished name fields, such as CN=www.server.com, C=US. The wildcard * selects the first certificate in the store. |
| UseSSL | Whether to negotiate TLS/SSL when connecting to the Couchbase server. |
| SSLServerCert | Specifies the certificate to be accepted from the server when connecting using TLS/SSL. |
Specifies the TLS/SSL client certificate store for SSL Client Authentication (2-way SSL). This property works in conjunction with other SSL-related properties to establish a secure connection.
string
""
This property specifies the client certificate store for SSL Client Authentication. Use this property alongside SSLClientCertType, which defines the type of the certificate store, and SSLClientCertPassword, which specifies the password for password-protected stores. When SSLClientCert is set and SSLClientCertSubject is configured, the driver searches for a certificate matching the specified subject.
Certificate store designations vary by platform. On Windows, certificate stores are identified by names such as MY (personal certificates), while in Java, the certificate store is typically a file containing certificates and optional private keys.
The following are designations of the most common User and Machine certificate stores in Windows:
| MY | A certificate store holding personal certificates with their associated private keys. |
| CA | Certifying authority certificates. |
| ROOT | Root certificates. |
| SPC | Software publisher certificates. |
For PFXFile types, set this property to the filename. For PFXBlob types, set this property to the binary contents of the file in PKCS12 format.
Specifies the type of key store containing the TLS/SSL client certificate for SSL Client Authentication. Choose from a variety of key store formats depending on your platform and certificate source.
string
"PEMKEY_BLOB"
This property determines the format and location of the key store used to provide the client certificate. Supported values include platform-specific and universal key store formats. The available values and their usage are:
| USER - default | For Windows, this specifies that the certificate store is a certificate store owned by the current user. Note that this store type is not available in Java. |
| MACHINE | For Windows, this specifies that the certificate store is a machine store. Note that this store type is not available in Java. |
| PFXFILE | The certificate store is the name of a PFX (PKCS12) file containing certificates. |
| PFXBLOB | The certificate store is a string (base-64-encoded) representing a certificate store in PFX (PKCS12) format. |
| JKSFILE | The certificate store is the name of a Java key store (JKS) file containing certificates. Note that this store type is only available in Java. |
| JKSBLOB | The certificate store is a string (base-64-encoded) representing a certificate store in JKS format. Note that this store type is only available in Java. |
| PEMKEY_FILE | The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate. |
| PEMKEY_BLOB | The certificate store is a string (base64-encoded) that contains a private key and an optional certificate. |
| PUBLIC_KEY_FILE | The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate. |
| PUBLIC_KEY_BLOB | The certificate store is a string (base-64-encoded) that contains a PEM- or DER-encoded public key certificate. |
| SSHPUBLIC_KEY_FILE | The certificate store is the name of a file that contains an SSH-style public key. |
| SSHPUBLIC_KEY_BLOB | The certificate store is a string (base-64-encoded) that contains an SSH-style public key. |
| P7BFILE | The certificate store is the name of a PKCS7 file containing certificates. |
| PPKFILE | The certificate store is the name of a file that contains a PuTTY Private Key (PPK). |
| XMLFILE | The certificate store is the name of a file that contains a certificate in XML format. |
| XMLBLOB | The certificate store is a string that contains a certificate in XML format. |
| BCFKSFILE | The certificate store is the name of a file that contains an Bouncy Castle keystore. |
| BCFKSBLOB | The certificate store is a string (base-64-encoded) that contains a Bouncy Castle keystore. |
Specifes the password required to access the TLS/SSL client certificate store. Use this property if the selected certificate store type requires a password for access.
string
""
This property provides the password needed to open a password-protected certificate store. This property is necessary when using certificate stores that require a password for decryption, as is often recommended for PFX or JKS type stores.
If the certificate store type does not require a password, for example USER or MACHINE on Windows, this property can be left blank. Ensure that the password matches the one associated with the specified certificate store to avoid authentication errors.
Specifes the subject of the TLS/SSL client certificate to locate it in the certificate store. Use a comma-separated list of distinguished name fields, such as CN=www.server.com, C=US. The wildcard * selects the first certificate in the store.
string
"*"
This property determines which client certificate to load based on its subject. The Cloud searches for a certificate that exactly matches the specified subject. If no exact match is found, the Cloud looks for certificates containing the value of the subject. If no match is found, no certificate is selected.
The subject should follow the standard format of a comma-separated list of distinguished name fields and values. For example, CN=www.server.com, OU=Test, C=US. Common fields include the following:
| Field | Meaning |
| CN | Common Name. This is commonly a host name like www.server.com. |
| O | Organization |
| OU | Organizational Unit |
| L | Locality |
| S | State |
| C | Country |
| E | Email Address |
Note: If any field contains special characters, such as commas, the value must be quoted. For example: CN="Example, Inc.", C=US.
Whether to negotiate TLS/SSL when connecting to the Couchbase server.
bool
true
When this is set to true, the defaults for the following options change:
| Property | Plaintext Default | SSL Default |
| AnalyticsPort | 8095 | 18095 |
| N1QLPort | 8093 | 18093 |
| WebConsolePort | 8091 | 18091 |
This option should be enabled when connecting to Couchbase Capella because all Capella deployments use SSL by default.
Specifies the certificate to be accepted from the server when connecting using TLS/SSL.
string
""
If you are using a TLS/SSL connection, use this property to specify the TLS/SSL certificate to be accepted from the server. If you specify a value for this property, all other certificates that are not trusted by the machine are rejected.
This property can take the following forms:
| Description | Example |
| A full PEM Certificate (example shortened for brevity) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
| A path to a local file containing the certificate | C:\cert.cer |
| The public key (example shortened for brevity) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
| The MD5 Thumbprint (hex values can also be either space- or colon-separated) | ecadbdda5a1529c58a1e9e09828d70e4 |
| The SHA1 Thumbprint (hex values can also be either space- or colon-separated) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
Note: It is possible to use '*' to signify that all certificates should be accepted, but due to security concerns this is not recommended.
This section provides a complete list of the Logging properties you can configure in the connection string for this provider.
| Property | Description |
| Verbosity | Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5. |
Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5.
string
"1"
This property defines the level of detail the Cloud includes in the log file. Higher verbosity levels increase the detail of the logged information, but may also result in larger log files and slower performance due to the additional data being captured.
The default verbosity level is 1, which is recommended for regular operation. Higher verbosity levels are primarily intended for debugging purposes. For more information on each level, refer to Logging.
When combined with the LogModules property, Verbosity can refine logging to specific categories of information.
This section provides a complete list of the Schema properties you can configure in the connection string for this provider.
| Property | Description |
| BrowsableSchemas | Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC . |
| Dataverse | Which Analytics dataverse to scan when discovering tables. |
| TypeDetectionScheme | Determines how the provider builds tables and columns from the buckets found in Couchbase. |
| InferNumSampleValues | The maximum number of values for every field to scan before determining its data type. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| InferSampleSize | The maximum number of documents to scan for the columns available in the bucket. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| InferSimilarityMetric | Specifies the similarity degree where different schemas will be considered to be the same flavor. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER. |
| FlexibleSchemas | Whether the provider allows queries to use columns that it has not discovered. |
| ExposeTTL | Specifies whether document TTL information should be exposed. |
| NumericStrings | Whether to allow string values to be treated as numbers. |
| IgnoreChildAggregates | Whether the provider exposes aggregate columns that are also available as child tables. Ignored if TableSupport is not set to Full. |
| TableSupport | How much effort the provider will put into discovering tables on the Couchbase server. |
| NewChildJoinsMode | Determines the kind of child table model the provider exposes. |
Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC .
string
""
Listing all available database schemas can take extra time, thus degrading performance. Providing a list of schemas in the connection string saves time and improves performance.
Which Analytics dataverse to scan when discovering tables.
string
""
This property is empty by default, which means that all dataverses will be scanned and table names will be generated as described in DataverseSeparator.
If you assign this property to a non-blank value, then the Cloud will scan only the corresponding dataverse (for example, setting this to "Default" scans the Default dataverse). Since only one dataverse is being scanned, table names will not be prefixed with the dataverse name. It is recommended to set this property to "Default" if you are coming from a previous version of the Cloud and need backwards compatability.
If you are connecting to Couchbase 7.0 or later, this option will be treated as a compound name containing both a dataset and a scope.
For example, if you have previously created collections like these:
CREATE ANALYTICS SCOPE websites.exampledotcom CREATE ANALYTICS COLLECTION websites.exampledotcom.traffic ON examplecom_traffic_bucket CREATE ANALYTICS COLLECTION websites.exampledotcom.ads ON examplecom_ads_bucketYou would set this option to "websites.exampledotcom".
Determines how the provider builds tables and columns from the buckets found in Couchbase.
string
"DocType"
A comma-separated list of the following options:
| DocType | This discovers tables by checking at each bucket and looking for different values of the "docType" field in the documents. For example, if the bucket beer-sample contains documents with "docType" = 'brewery' and "docType" = 'beer', this will generate three tables: beer-sample (containing all documents), beer-sample.brewery (containing just breweries) and beer-sample.beer (containing just beers).
Like RowScan, this will scan a sample of the documents in each flavor and determine the data type for each field. RowScanDepth determines how many documents are scanned from each flavor. |
| DocType=fieldName | Like DocType, but this scans based off of a field called "fieldName" rather than "docType". "fieldName" must match the field name in Couchbase exactly, including case. |
| Infer | This uses the N1QL INFER statement to determine what tables and columns exist. This does more flexible flavor detection than DocType. |
| RowScan | This reads a sample of documents from a bucket, and heuristically determines the data type. RowScanDepth determines how many documents are scanned. It does not do any flavor detection. |
| None | This is like RowScan, but will always return columns that have string types instead of the detected type. |
The maximum number of values for every field to scan before determining its data type. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER.
string
"10"
The maximum number of values to scan from every field of the sampled documents before determining the field's data type. This property enables additional configuration of Automatic Schema Discovery when you are using the Couchbase Infer command -- TypeDetectionScheme must also be set to Infer to use this propery.
The maximum number of documents to scan for the columns available in the bucket. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER.
string
"100"
The maximum number of documents to scan for the columns available in the bucket. The Infer command will return column metadata by scanning a random sample of documents of the size specified here.
Setting a high value may decrease performance. Setting a low value may prevent the column and data type from being determined properly, especially when there is null data.
This property enables additional configuration of Automatic Schema Discovery when you are using the Couchbase Infer command -- TypeDetectionScheme must also be set to Infer to use this propery.
Specifies the similarity degree where different schemas will be considered to be the same flavor. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER.
string
"0.7"
This property specifies how similar two schemas must be to be considered to be the same flavor. As an example, consider the following rows:
Row 1: ColA, ColB, ColC, ColD
Row 2: ColA, ColB, ColE, ColF
Row 3: ColB, ColF, ColX, ColY
You can configure the columns returned for each flavor with different InferSimilarityMetric values, as in the following examples:
You can then query document flavors using dot notation, as in the following statement:
SELECT * FROM [Items.Technology]
This property enables additional configuration of Automatic Schema Discovery when you are using the Couchbase Infer command -- TypeDetectionScheme must also be set to Infer to use this propery.
Whether the provider allows queries to use columns that it has not discovered.
bool
false
By default Cloud will only allow queries to use columns that it has found during the metadata discovery process (see TypeDetectionScheme for details). This means that the Cloud has the full information for each column it presents, but it also means that fields set on only a few documents may not be exposed. Disabling this option means that the Cloud will allow you to write a query with any columns you want. If you use columns in a query that have not been discovered the Cloud will assume that they are simple strings.
For example, the Cloud uses column type information to automatically convert dates for comparision since Couchbase cannot natively compare dates directly.
If the Cloud detects that datecol is a date field, it can apply the STR_TO_MILLIS conversion automatically:
/* SQL */
WHERE datecol < '2020-06-12';
/* N1QL */
WHERE STR_TO_MILLIS(datecol) < STR_TO_MILLIS('2020-06-12');
When using undiscovered columns the Cloud cannot make this type of conversion for you. You must apply any needed conversions manually to ensure that operations behave the way you want them to.
Specifies whether document TTL information should be exposed.
bool
false
By default the Cloud does not expose TTL values or consider document TTLs when performing DML operations. Enabling this option exposes TTL values in two ways:
Note that enabling this features requires that your server be version 6.5.1 or later and that your CouchbaseService is set to N1QL. If either of these is not the case the Cloud will not connect.
Whether to allow string values to be treated as numbers.
bool
true
By default this property is enabled and the Cloud will treat string values as numeric if they all the values it samples during schema detection are numeric. This can cause type errors later on if the field contains non-numeric values in other documents. If this property is disabled then numeric strings are left as strings although other string-based data types like timestamps will still be detected.
For example, the "code" field in the below bucket would be affected by this
setting. By default it would be considered an integer but if this property
were enabled it would be treated as a string.
{ "code": "123", "message": "Please restart your computer" }
{ "code": "456", "message": "Urgent update must be applied" }
Whether the provider exposes aggregate columns that are also available as child tables. Ignored if TableSupport is not set to Full.
bool
false
The Cloud will expose array fields within a bucket as a separate child table, such as in the Games_scores example described in Automatic Schema Discovery.
By default the Cloud will also expose these array fields as JSON aggregates on the base table.
For example, either of these queries would return information on game scores:
/* Return each score as an individual row */ SELECT value FROM Games_scores; /* Return all scores for each Game as a JSON string */ SELECT scores FROM Games;
Since these aggregates are exposed on the base table, they will be generated even when the information they contain is redundant.
For example, when performing this join the scores aggregate on Games is populated as well as the value column on Games_scores.
Internally this causes two copies of the scores data to be transferred from Couchbase.
/* Retrieves score data twice, once for Games.scores and once for Games_scores.value */ SELECT * FROM Games INNER JOIN Games_scores ON Games.[Document.Id] = Games_scores.[Document.Id]
This option can be used to prevent the aggregate field from being exposed when the same information is also available from a child table.
In the games example, setting this option to true means that the Games table would only expose a primary key column.
The only way to retrieve information about scores would be the child table, so score data would only be read once from Couchbase.
/* Only exposes Document.Id, not scores */ SELECT * FROM Games; /* Only retrieves score data once for Games_scores.value */ SELECT * FROM Games INNER JOIN Games_scores ON Games.[Document.Id] = Games_scores.[Document.Id]
Note that this option overrides FlattenArrays, since all data from flattened arrays is also avaialable as child tables. If this option is set then no array flattening is performed, even if FlattenArrays is set to a value over 0.
How much effort the provider will put into discovering tables on the Couchbase server.
string
"Full"
The available options are:
| Full | The Cloud will discover the available buckets, and look inside of each of those buckets for child tables. This provides the most flexible way to access nested data, but requires that each bucket on your server have primary indexes. |
| Basic | The Cloud will discover the available buckets, but will not look inside of them for child tables. This is recommended for cases where you either want to reduce the time that schema detection takes, or if your buckets do not have primary indexes. |
| None | The Cloud will only use the schema files found in the Location directory, and will not discover buckets on the server. This option should only be used after you have already created schema files. Using this option without schema files will result in no tables being available. |
Determines the kind of child table model the provider exposes.
bool
false
By default the Cloud exposes a backwards-compatible data model that is not fully relational. In this mode non-child tables have a primary key called Document.Id, but child tables do not have a primary key. Instead they have a column called Document.Id which has the same value as the Document.Id of the parent row that contains the child row.
For example, a parent table invoices containing invoice records may look like this:
| Document.Id | customer |
| 1 | Adam |
| 2 | Beatrice |
| 3 | Charlie |
And its child invoices_lineitems containing line items may look like this:
| Document.Id | item |
| 1 | laptop |
| 1 | keyboard |
| 2 | stapler |
| 3 | whiteboard |
| 3 | markers |
This model has several limitations:
The NewChildJoins data model is fully relational. In this mode non-child tables have the same Document.Id as before, but child tables are extended to have both a foreign key and a primary key. The foreign key is called Document.Parent and it refers to the Document.Id of the row in the parent table that contains the child row. The primary key is called Document.Id and it contains a path which uniquely refers to that child row.
For example, the same tables as above would look like this in the NewChildJoins model. invoices would be the same:
| Document.Id | customer |
| 1 | Adam |
| 2 | Beatrice |
| 3 | Charlie |
However, invoices_lineitems would have both a primary and foreign key. The primary key contains the ID of the parent row as well as the child row's position in the parent.
| Document.Id | Document.Parent | item |
| 1$1 | 1 | laptop |
| 1$2 | 1 | keyboard |
| 2$1 | 2 | stapler |
| 3$1 | 3 | whiteboard |
| 3$2 | 3 | markers |
This fixes the limitations of the old data model:
This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.
| Property | Description |
| ChildSeparator | The character or characters used to denote child tables. |
| CreateTableRamQuota | The default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax. |
| DataverseSeparator | The character or characters used to denote Analytics dataverses and scopes/collections. |
| FlattenArrays | The number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled. |
| FlattenObjects | Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, objects nested in arrays are returned as strings of JSON. |
| FlavorSeparator | The character or characters used to denote flavors. |
| InsertNullValues | Determines whether an INSERT should include fields that have NULL values. |
| MaxRows | Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY. |
| Pagesize | Specifies the maximum number of records per page the provider returns when requesting data from Couchbase. |
| PeriodsSeparator | The character or characters used to denote hierarchy. |
| PseudoColumns | Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'. |
| QueryExecutionTimeout | This sets the server-side timeout for the query, which governs how long Couchbase will execute the query before returning a timeout error. |
| RowScanDepth | The maximum number of rows to scan to look for the columns available in a table. |
| StrictComparison | Adjusts how precisely to translate filters on SQL input queries into Couchbase queries. This can be set to a comma-separated list of values, where each value can be one of: date, number, boolean, or string. |
| Timeout | Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. |
| TransactionDurability | Specifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries. |
| TransactionTimeout | This sets the amount of time a transaction may execute before it is timed out by Couchbase. |
| UpdateNullValues | Determines whether an UPDATE writes NULL values as NULL, or removes them. |
| UseCollectionsForDDL | Whether to assume that CREATE TABLE statements use collections instead of flavors. Only takes effect when connecting to Couchbase v7+ and GenerateSchemaFiles is set to OnCreate. |
| UseTransactions | Specifies whether to use N1QL transactions when executing queries. |
The character or characters used to denote child tables.
string
"_"
When creating a child table for an array underneath a bucket, the Cloud will generate the name of the child table by concatenating the name of the base table, along with this separator and each path element.
For example, if this document were in the bucket "customers", then the child table for the addresses field would be called "customers_addresses".
{
"addresses": [
{"street": "123 Main St"},
{"street": "424 Pleasant Ct"},
{"street": "719 Blue Way"}
]
}
The default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax.
string
"250"
The default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax.
The character or characters used to denote Analytics dataverses and scopes/collections.
string
"."
When using the Analytics serivce, the Cloud will scan all datasets from all available dataverses. To avoid potential name conflicts, it will include the dataverse name and the dataset name in the generated table name.
By default this is set to ".", so that if there is a dataset called "users" on the "Default" dataverse, then the table generated will be "Default.users".
This property is also used when generating table names for collections (on both N1QL and Analytics) on Couchbase 7 and later. For example, a bucket called "users" that has two collections called "active" and "inactive" under the "status" scope would be detected as the tables "users.status.active" and "users.status.inactive".
The number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled.
string
"0"
By default, nested arrays are returned as strings of JSON. The FlattenArrays property can be used to flatten the elements of nested arrays into columns of their own. This is only recommended for arrays that are expected to be short.
Set FlattenArrays to the number of elements you want to return from nested arrays. The specified elements are returned as columns. The zero-based index is concatenated to the column name. Other elements are ignored.
For example, you can return an arbitrary number of elements from an array of strings:
["FLOW-MATIC","LISP","COBOL"]When FlattenArrays is set to 1, the preceding array is flattened into the following table:
| Column Name | Column Value |
| languages.0 | FLOW-MATIC |
Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, objects nested in arrays are returned as strings of JSON.
bool
true
Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, objects nested in arrays are returned as strings of JSON. The property name is concatenated onto the object name with an underscore to generate the column name.
For example, you can flatten the nested objects below at connection time:
address : {
"street" : "123 Main St.",
"city" : "Nowhere",
"state" : "NY",
"zip" : "12345"
}
When FlattenObjects is set to true, the preceding object is flattened into the following table:
| Column Name | Column Value |
| address.street | 123 Main St. |
| address.city | Nowhere |
| address.state | NY |
| address.zip | 12345 |
The character or characters used to denote flavors.
string
"."
When the Cloud detects a flavored table, using either a DocType or Infer TypeDetectionScheme, it names flavored tables by concatenating the underlying bucket name, this seprator, and the value of the bucket's primary flavor.
For example, if the Cloud detects the flavor "docType = 'beer'" on the "beer-sample" bucket, then it will generate the table "beer-sample.beer" which contains only documents in "beer-sample" which have the "beer" doctype.
Determines whether an INSERT should include fields that have NULL values.
bool
true
By default the Cloud uses NULL values provided in an INSERT statement and inserts them as JSON null values.
If this option is disabled, SQL NULL values are ignored during an INSERT. In the case of array columns (FlattenArrays must be set to retrieve these), this means that array indices are shifted over to compensate for the values that have been removed.
Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY.
int
-1
The default value for this property, -1, means that no row limit is enforced unless the query explicitly includes a LIMIT clause. (When a query includes a LIMIT clause, the value specified in the query takes precedence over the MaxRows setting.)
Setting MaxRows to a whole number greater than 0 ensures that queries do not return excessively large result sets by default.
This property is useful for optimizing performance and preventing excessive resource consumption when executing queries that could otherwise return very large datasets.
Specifies the maximum number of records per page the provider returns when requesting data from Couchbase.
int
1000
When processing a query, instead of requesting all of the queried data at once from Couchbase, the Cloud can request the queried data in pieces called pages.
This connection property determines the maximum number of results that the Cloud requests per page.
Note: Setting large page sizes may improve overall query execution time, but doing so causes the Cloud to use more memory when executing queries and risks triggering a timeout.
The character or characters used to denote hierarchy.
string
"."
When flattening objects and arrays, the Cloud will use this value to separate different levels of objects and arrays. For example, if your Couchbase server returns a document like this (and FlattenObjects is enabled), then the Cloud will return the columns "geo.latitude" and "geo.longitude" if the periods separator is set to ".".
{
"geo": {
"latitude": 35.9132,
"longitude": -79.0558
}
}
Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'.
string
""
This property allows you to define which pseudocolumns the Cloud exposes as table columns.
To specify individual pseudocolumns, use the following format:
Table1=Column1;Table1=Column2;Table2=Column3
To include all pseudocolumns for all tables use:
*=*
This sets the server-side timeout for the query, which governs how long Couchbase will execute the query before returning a timeout error.
string
"-1"
Th default is -1, which disables the timeout. When enabling the timeout, the value must include both an amount and a unit, which can be one of: "ns" (nanoseconds), "us" (microseconds), "ms" (milliseconds), "s" (seconds), "m" (minutes) or "h" (hours). For example, "5m" and "300s" both set timeouts of 5 minutes.
There is a server-side timeout as well called the "index scan timeout", which will override this one if it is lower. By default the index scan timeout is 2 minutes, but it can be changed by setting the "indexer.settings.scan_timeout" property on your Couchbase server.
The maximum number of rows to scan to look for the columns available in a table.
int
100
The columns in a table must be determined by scanning table rows. This value determines the maximum number of rows that will be scanned.
Setting a high value may decrease performance. Setting a low value may prevent the data type from being determined properly, especially when there is null data.
Adjusts how precisely to translate filters on SQL input queries into Couchbase queries. This can be set to a comma-separated list of values, where each value can be one of: date, number, boolean, or string.
string
""
This option is empty by default, which means that WHERE clauses sent to Couchbase will include extra functions that convert values so that more comparisons work.
For example, leaving the "string" setting out of the list causes arrays to be
converted, so that they can be compared with strings:
SELECT * FROM Bucket WHERE MyArrayColumn = '[1,2,3]'
If set to a value, queries including the relevant types of comparisons will be translated literally. This makes better use of Couchbase's indexes, but means that the types of comparisons must be in a format Couchbase can compare directly.
For example, if "date" is provided as one of the options, then dates must match
the format they are stored as in Couchbase since they will not be converted
automatically:
SELECT * FROM Bucket WHERE MyDateColumn = '2018-10-31T10:00:00';
Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error.
int
60
The timeout applies to each individual communication with the server rather than the entire query or operation. For example, a query could continue running beyond 60 seconds if each paging call completes within the timeout limit.
Timeout is set to 60 seconds by default. To disable timeouts, set this property to 0.
Disabling the timeout allows operations to run indefinitely until they succeed or fail due to other conditions such as server-side timeouts, network interruptions, or resource limits on the server.
Note: Use this property cautiously to avoid long-running operations that could degrade performance or result in unresponsive behavior.
Specifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries.
string
"Majority"
If UseTransactions is enabled, then this option can be set to determine when Couchbase will allow writes in transactions to commit. The Couchbase documentation on Durability and Transactions contains the full details, below is a high-level summary.
This option controls requirements on both quorum and persistence. The quorum may either require no bucket replicas to receive the document (None), or a majority of replicas to have the document (all others). The persistence level requires either that the document be stored in the replica memory (Majoriy) or on the replica disk (MajorityAndPersistActive, PersistToMajority).
None is only useful if the bucket you are using is not configured for replicas. The other options can be used depending on the required performance and durability tradeoffs. Persisting to more replicas is slower but provides greater resilience against a node crashing.
This sets the amount of time a transaction may execute before it is timed out by Couchbase.
string
""
If transactions are enabled, then the Cloud will default to the server's default transaction timeout setting.
When enabling the timeout, the value must include both an amount and a unit, which can be one of: "ns" (nanoseconds), "us" (microseconds), "ms" (milliseconds), "s" (seconds), "m" (minutes) or "h" (hours). For example, "5m" and "300s" both set timeouts of 5 minutes.
There are also cluster-level and node-level transaction timeouts which override this one if they are smaller. For example, if the node-level timeout is set to a minute then setting this option to "5m" will have no effect.
Determines whether an UPDATE writes NULL values as NULL, or removes them.
bool
true
By default the Cloud will use NULL values provided in an UPDATE statement and set the field in Couchbase to NULL.
If this option is disabled SQL NULL values in an UPDATE will cause the Cloud to mark the field as MISSING. This removes the field from the object containing it, or if the field is contained in an array (per FlattenArrays) then that element is set to NULL.
This option should be used with care as the Cloud may not detect that the field exists if it is removed from enough documents within a bucket.
Whether to assume that CREATE TABLE statements use collections instead of flavors. Only takes effect when connecting to Couchbase v7+ and GenerateSchemaFiles is set to OnCreate.
bool
false
Normally the Cloud will assume that compound table names referenced in a CREATE TABLE statement are flavors.
For compatibility, this is still the default with Couchbase v7+ even though flavors are not recommended there.
CREATE TABLE [myBucket.myFlavor]( [Document.Id] VARCHAR PRIMARY KEY, docType VARCHAR, sometext VARCHAR, somenum INT )
Enable this option to assume that CREATE TABLE statements refer to collection instead.
In that scenario this query willl create the bucket and scope if necessary, before creating the colleciton and setting a primary index:
CREATE TABLE [myBucket.myScope.myCollection]( [Document.Id] VARCHAR PRIMARY KEY, sometext VARCHAR, somenum INT )
Specifies whether to use N1QL transactions when executing queries.
string
"Never"
By default the Cloud does not use transactions for compatibility with older versions of Couchbase. All of the other options require a connection to Couchbase 7 or above. The N1QL service must also be enabled using CouchbaseService.
Setting this to Always means that all queries will use transactions. An explicit transaction may be created on the connection and queries will use that transaction while it is active. If there is no explicit transaction then queries will use implicit transactions instead.
Setting this to Explicit enables support for explicit transactions only. Explicit transactions may be created but if one is not currently active, then statements will not create an implicit transaction.
LZMA from 7Zip LZMA SDK
LZMA SDK is placed in the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
LZMA2 from XZ SDK
Version 1.9 and older are in the public domain.
Xamarin.Forms
Xamarin SDK
The MIT License (MIT)
Copyright (c) .NET Foundation Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NSIS 3.10
Copyright (C) 1999-2025 Contributors THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.