Cloud

Build 25.0.9435
  • Couchbase
    • はじめに
      • 接続の確立
    • NoSQL データベース
      • 自動スキーマ検出
      • クエリマッピング
      • 垂直フラット化
      • ユーザー定義関数
      • JSON 関数
      • カスタムスキーマ定義
      • カスタムスキーマ例
      • SSL の設定
      • ファイアウォールとプロキシ
    • データモデル
      • ストアドプロシージャ
        • AddDocument
        • CreateBucket
        • CreateCollection
        • CreateScope
        • CreateSearchIndex
        • CreateUserTable
        • DeleteBucket
        • DeleteCollection
        • DeleteScope
        • ExecuteSearchIndex
        • FlushBucket
        • ListIndices
        • ManageIndices
      • システムテーブル
        • sys_catalogs
        • sys_schemas
        • sys_tables
        • sys_tablecolumns
        • sys_procedures
        • sys_procedureparameters
        • sys_keycolumns
        • sys_foreignkeys
        • sys_primarykeys
        • sys_indexes
        • sys_connection_props
        • sys_sqlinfo
        • sys_identity
        • sys_information
    • 接続文字列オプション
      • Authentication
        • AuthScheme
        • User
        • Password
        • Server
        • CouchbaseService
        • ConnectionMode
        • DNSServer
        • N1QLPort
        • AnalyticsPort
        • WebConsolePort
        • SearchPort
      • SSL
        • SSLClientCert
        • SSLClientCertType
        • SSLClientCertPassword
        • SSLClientCertSubject
        • UseSSL
        • SSLServerCert
      • Logging
        • Verbosity
      • Schema
        • BrowsableSchemas
        • Dataverse
        • TypeDetectionScheme
        • InferNumSampleValues
        • InferSampleSize
        • InferSimilarityMetric
        • FlexibleSchemas
        • ExposeTTL
        • NumericStrings
        • IgnoreChildAggregates
        • TableSupport
        • NewChildJoinsMode
      • Miscellaneous
        • ChildSeparator
        • CreateTableRamQuota
        • DataverseSeparator
        • FlattenArrays
        • FlattenObjects
        • FlavorSeparator
        • InsertNullValues
        • MaxRows
        • Pagesize
        • PeriodsSeparator
        • PseudoColumns
        • QueryExecutionTimeout
        • RowScanDepth
        • StrictComparison
        • Timeout
        • TransactionDurability
        • TransactionTimeout
        • UpdateNullValues
        • UseCollectionsForDDL
        • UseTransactions
    • Third Party Copyrights

Couchbase - CData Cloud

概要

CData Cloud は、クラウドホスト型のソリューションで、複数の標準サービスやプロトコルにまたがるCouchbase へのアクセスを実現します。SQL Server データベースに接続できるアプリケーションであれば、CData Cloud を介してCouchbase に接続できます。

CData Cloud により、他のOData エンドポイントや標準SQL Server と同じように、Couchbase への接続を標準化し、構成することができます。

主要機能

  • SQL をフルサポート:Couchbase は、標準のリレーショナルデータベースとして表示され、Filter、Group、Join などの操作を実行できます。これらの操作は基盤となるAPI でサポートされているかどうかに関わらず、標準SQL を使用します。
  • CRUD サポート:読み取りと書き込みの両方の操作がサポートされており、Cloud またはデータソースのダウンストリームで設定できるセキュリティ設定によってのみ制限されます。
  • セキュアアクセス:管理者は、ユーザーを作成し、特定のデータベースへのアクセス、読み取り専用操作、または完全な読み書きの権限を定義することができます。
  • 包括的なデータモデルとダイナミックディスカバリー:CData Cloud は、動的データや検索可能なメタデータへのフルアクセスなど、基盤となるデータソースで公開されるすべてのデータへの包括的なアクセスを提供します。

CData Cloud

はじめに

このページでは、CData Cloud でのCouchbase への接続の確立 のガイド、利用可能なリソースに関する情報、および使用可能な接続プロパティのリファレンスについて説明します。

Couchbase への接続

接続の確立 は、CData Cloud にデータベースを作成するためのCouchbase への認証方法と必要な接続プロパティの設定方法について示します。

CData Cloud サービスからデータにアクセス

利用可能な標準サービスを経由してCouchbase からデータにアクセスする方法と、CData Cloud の管理については、CData Cloud ドキュメント で詳しく説明します。

CData Cloud

接続の確立

Database タブで対応するアイコンを選択して、Couchbase に接続します。必須プロパティはSettings にリストされています。Advanced タブには、通常は必要ない接続プロパティが表示されます。

Connecting to Couchbase

To connect to data, set the Server property to the hostname or IP address of the Couchbase server(s) you are authenticating to.

If your Couchbase server is configured to use SSL, you can enable it either by using an https URL for Server (like https://couchbase.server), or by setting the UseSSL property to True.

Couchbase Analytics

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.

Couchbase Cloud

Set the following to connect to Couchbase Cloud:

  • AuthScheme: Set this to Basic.
  • ConnectionMode: Set this to Cloud.
  • DNSServer: Set this to a DNS server. In most cases, this should be a public DNS service like 1.1.1.1 or 8.8.8.8.
  • SSLServerCert: Set this to the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected. Alternatively, set "*" to accept all certificates.

Authenticating to Couchbase

The Cloud supports several forms of authentication. Couchbase Cloud only accepts Standard authentication, while Couchbase Server accepts Standard authentication, client certificates, and credentials files.

Standard Authentication

To authenticate with standard authentication, set the following:

  • AuthScheme: Set this to Basic.
  • User: The user authenticating to Couchbase.
  • Password: The password of the user authenticating to Couchbase.

Client Certificates

The Cloud supports authenticating with client certificates when SSL is enabled. To use client certificate authentication, set the following properties:

  • AuthScheme: Set this to SSLCertificate.
  • SSLClientCertType: The type of client certificate set within SSLClientCert.
  • SSLClientCert: The client certificate in the format given by SSLClientCertType.
  • SSLClientCertPassword (optional): The password of the client certificate, if it is encrypted.
  • SSLClientCertSubject (optional): The subject of the client certificate, which, by default, is the first certificate found in the store. This is required if more than one certificate is available in the certificate store.

Credentials File

You can also authenticate using using a credentials file containing multiple logins. This is included for legacy use and is not recommended when connecting to a Couchbase Server that supports role-based authentication.

  • AuthScheme: Set this to CredentialsFile.
  • CredentialsFile: The path to the credentials file. Refer to Couchbase's documentation for more information on the format of this file.

CData Cloud

NoSQL データベース

Couchbase はスキーマフリーなドキュメントデータベースで、高いパフォーマンス、使用性、およびスケーラビリティを提供します。これらの機能は、必ずしもSQL-92 のような標準準拠のクエリ言語と互換しないわけではありません。

Cloudでは、スキーマフリーなCouchbase オブジェクトをリレーショナルテーブルにモデル化し、SQL クエリをN1QL またはSQL++ (Analytics) クエリに読み替えることで、要求されたデータを取得します。このセクションでは、Cloud が複数のやり方によって、リレーショナルSQL とドキュメントデータベースのギャップの橋渡しをいかに行うかを説明します。

自動スキーマ検出

Cloud が最初にCouchbase に接続すると、各バケットを開きそのバケットから設定可能な数の行をスキャンします。それらの行を使用して、そのバケット内のカラムとデータ型、およびそれらのドキュメント内の任意の配列に対するフレーバーテーブルと子テーブルの作成方法を決定します。Couchbase Enterprise バージョン4.5.1以降では、TypeDetectionScheme がINFER に設定されている場合は、Cloud はINFER コマンドを使用するように設定することもできます。これにより、Cloud はバケットのより正確なカラムリストを取得し、より複雑なフレーバーを検出することができます。

Analytics サービスを使用する場合、Cloud はカラムと子テーブルの検出のみを行います。フレーバーテーブルは、シャドウデータセットを使用してCouchbase 自体によって提供されます。また、Analytics モードは現在INFER をサポートしていないため、行スキャンのみがサポートされています。

詳しくは、自動スキーマ検出 を参照して、フレーバーテーブルと子テーブルがCouchbase データからどのようにモデル化されるかをご確認ください。 Setting NumericStrings is also recommended as it can avoid type detection issues with certain kinds of text data.

カスタムスキーマ定義

オプションとして、カスタムスキーマ定義 を使って、Couchbase オブジェクトの上に選択されたリレーショナル構造を投射することもできます。これにより、自分で選択したカラム名、データ型、Couchbase ドキュメント内の値の位置を定義することができます。

クエリマッピング

さまざまなN1QL およびSQL++ 処理がどのようにSQL として表されているかについての詳細はクエリマッピング を参照してください。

垂直フラット化

配列とオブジェクトがどのようにフィールドにマップされるかについての詳細は、垂直フラット化 を参照してください。

JSON 関数

生のJSON 文字列からデータを抽出する方法についての詳細は、JSON 関数 を参照してください。

CData Cloud

自動スキーマ検出

子テーブル

バケット内のドキュメントに配列を含むフィールドが含まれる場合、Cloud はそれらのフィールドをメインテーブルのJSON 集計として公開するだけでなく、独自のテーブルとして公開します。これらの子テーブルの構造は、配列にオブジェクトまたはプリミティブ値が含まれるかどうかによって異なります。

配列の子テーブル

配列に数値や文字列などのプリミティブな値が含まれる場合、子テーブルには2つのカラムしかありません。配列を含むドキュメントの主キーである"Document.Id" と、配列内の値を含む"value" です。例えば、"Games" というバケットにこれらのドキュメントが含まれる場合:

/* Primary key "1" */
{
  "scores": [1,2,3]
}

/* Primary key "2" */
{
  "scores": [4,5,6]
}

Cloud は、これらの行を含む"Games_scores" という名前のテーブルをビルドします:

Document.Id value
1 1
1 2
1 3
2 4
2 5
2 6

オブジェクトの子テーブル

配列にオブジェクトが含まれる場合、子テーブルには、そのオブジェクト内にある各フィールドのカラムと、その配列を含むドキュメントの主キーを含む"Document.Id" カラムがあります。例えば、"Games" というバケットにこれらのドキュメントが含まれる場合:

/* Primary key "1" */
{
  "moves": [
    {"piece": "pawn", "square": "c3"},
    {"piece": "rook", "square": "d5"}
  ]
}

/* Primary key "2" */
{
  "moves": [
    {"piece": "knight", "square": "f1"},
    {"piece": "bishop", "square": "e4"}
  ]
}

Cloud は、これらの行を含む"Games_moves" という名前のテーブルをビルドします:

Document.Id piece square
1 pawn c3
1 rook d5
2 knight f1
2 biship e4

NewChildJoinsMode

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.

フレーバーテーブル

Cloud は、TypeDetectionScheme がInfer またはDocType に設定され、CouchbaseService がN1QL に設定されている限り、同じバケット内に複数の種類のドキュメントが存在する場合も検出できます。これらの異なる種類のドキュメントは、適切な行のみを含む独自のテーブルとして公開されています。

例えば、"Games" というバケットには、"type" の値が "chess" または"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
}

Cloud はこのバケット用に3テーブル作成します。1つは、すべてのドキュメントを含む"Games" と呼ばれるバケットです:

Document.Id result score type
1 stalemate NULL chess
2 black win NULL chess
3 NULL 23 football
4 NULL 18 football

1つは、type が"chess" であるドキュメントのみを含む"Games.chess" と呼ばれるものです。

Document.Id result type
1 stalemate chess
2 black win chess

1つは、type が"football" であるドキュメントのみを含む"Games.football" と呼ばれるものです。

Document.Id score type
3 23 football
4 18 football

Cloud は、そのフレーバーのドキュメントで定義されていないフレーバーテーブルのカラムを含みません。例えば、"result" と"score" の両カラムが基本テーブルに含まれていても、"Games.chess" には"result" だけ、"Games.football" には"score" だけが含まれます。

フレーバーの子テーブル

フレーバーテーブルに配列を含めることもできます。これは独自の子テーブルになります。例えば、"Games" というバケットにこれらのドキュメントが含まれる場合:
/* 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]
}
Cloud はこれらのテーブルを生成します。

テーブル名 子フィールド フレーバーコンディション
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"

CData Cloud

クエリマッピング

Cloud では、SQL-92 準拠クエリを対応するN1QL またはSQL++ クエリにマッピングします。以下のマッピングは完全ではありませんが、この変換中にCloud が使用する一般的なパターンを理解するのに役立つはずです。

SELECT クエリ

SELECT ステートメントは、以下のように、適切なN1QL SELECT クエリに変換されます:SQL-92 とN1QL の類似により、多くのクエリは直接変換されます。

Cloud にCouchbase バケットのスキーマが存在する場合の一つの大きな相違は、SELECT * クエリはバケット内の一つのフィールドを直接SELECT するものに変換されることです。Cloud はまた、自動的にバケット内のそれぞれのドキュメントのプライマリーキーをベースにDocument.Id カラムを自動的に作成します。

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"]

Cloud が型変換が必要であることを検出した場合、条件に追加の型関数が含まれることがあることに注意してください。 StrictComparison プロパティを使用して、これらの型変換を無効にできます。明確にするために、残りのN1QL サンプルはこれらの追加の変換関数なしで示されています。

USE KEYS Optimizations

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.

子テーブル

クエリ内のすべての子テーブルが同じ親を共有し、それらの"Document.Id" カラムでINNER JOIN を使用して結合されている限り、Cloud はJOIN を単一のUNNEST 式に結合します。N1QL のUNNEST クエリとは異なり、フィールドにアクセスする場合は、基本テーブルに明示的にJOIN する必要があります。

SQL クエリ N1QL クエリ
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`

フレーバーテーブル

フレーバーテーブルには、クエリ時に常に適切な条件が含まれているため、フレーバーからのドキュメントのみが返されます。

SQL クエリ N1QL クエリ
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

Aggregate クエリ

N1QL はいくつかのビルトイン集計関数を持ちます。Cloud は、さまざまな集計クエリの拡張的利用を行います。以下にいくつか例を示します。

SQL クエリN1QL クエリ
SELECT Count(*) As Count FROM OrdersSELECT Count(*) AS `count` FROM `Orders`
SELECT Sum(price) As total FROM OrdersSELECT Sum(`price`) As `total` FROM `Orders`
SELECT cust_id, Sum(price) As total FROM Orders GROUP BY cust_id ORDER BY totalSELECT `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 > 250SELECT `cust_id`, `ord_date`, Sum(`price`) As `total` FROM `Orders` GROUP BY `cust_id`, `ord_date` Having `total` > 250

INSERT ステートメント

SQL のINSERT ステートメントは、次のようにN1QL INSERT ステートメントとしてマッピングされます。これは、トップレベルのフィールドと垂直フラット化 によって生成されたフィールドの両方で同じように機能します。

SQL クエリN1QL クエリ
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}})

子テーブルの挿入

子テーブルへの挿入は、配列処理を使用して内部的にN1QL のUPDATE に変換されます。これはトップレベルドキュメントを作成しないので、提供されるDocument.Id は既存のドキュメントを参照する必要があります。

子テーブルINSERT のもう1つの制限は、multi-valued INSERT がすべて同じDocument.Id を使用しなければならないことです。プロバイダーはデータを変更する前にこれを確認し、この成約に違反しているとエラーを発生させます。

SQL クエリ N1QL クエリ
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"})

一括INSERT ステートメント

一括INSERT もサポートされています。SQL Bulk INSERT は以下のように変換されます。

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
変換される文字列:
INSERT INTO `users` (KEY, VALUE) VALUES
  ('bcd001', {"age": 45, "status": "A"}),
  ('bcd002', {"age": 24, "status": "B"})

子テーブルのmulti-valued INSERT のように、一括INSERT のすべての行も同じDocument.Id を持つ必要があります。

更新ステートメント

SQL のUPDATE ステートメントは、次のようにN1QL UPDATE ステートメントとしてマッピングされます:

SQL クエリN1QL クエリ
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

子テーブルの更新

子テーブルを更新するとき、SQL クエリは"FOR" 式または"ARRAY" 式のいずれかを使用してUPDATE クエリに変換されます。

SQL クエリ N1QL クエリ
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

フレーバーテーブルの更新

フレーバーテーブルのSELECT と同様に、フレーバーテーブルのUPDATE は常に適切な条件が含まれているため、フレーバーに属するドキュメントのみが影響を受けます。

SQL クエリ N1QL クエリ
UPDATE [users.subscriber] SET status = 'C' WHERE age > 45 UPDATE `users` SET `status` = "C" WHERE `docType` = "subscriber" AND `age` > 45

削除ステートメント

SQL のDELETE ステートメントは、次のようにN1QL UPDATE ステートメントとしてマッピングされます:

SQL クエリN1QL クエリ
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"

子テーブルの削除

子テーブルから削除するとき、SQL クエリは"ARRAY" 式を使用してUPDATE クエリに変換されます。

SQL クエリ N1QL クエリ
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

フレーバーテーブルの削除

フレーバーテーブルのSELECT と同様に、フレーバーテーブルのDELETE は常に適切な条件が含まれているため、フレーバーに属するドキュメントのみが影響を受けます。

SQL クエリ N1QL クエリ
DELETE FROM [users.subscriber] WHERE status = 'inactive' DELETE FROM `users` WHERE `docType` = "subscriber" AND status = "inactive"

CData Cloud

垂直フラット化

サンプルドキュメント


/* 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"
}

オブジェクト内の値を選択

FlattenObjects プロパティがオブジェクトのフラット化を許容するように設定されている場合、Cloud はオブジェクトをトラバースしてそれらの中のフィールドをカラムとしてマップします。例えば、このクエリは:
SELECT [address.building], [address.street] FROM restaurants
この結果セットを返します:

address.building addres.street
1007 Morris Park Ave

配列内の値を選択

FlattenArrays プロパティが配列のフラット化を許容するように設定されている場合、Cloud は配列をトラバースして個々の値をカラムとしてマップします。例えば、Flatten Arrays が"2" に設定されている場合、このクエリは:
SELECT [address.coord.0], [address.coord.1] FROM restaurants
この結果セットを返します:

address.coord.0 address.coord.1
-73.856077 40.838447

配列のフラット化は、常に2つの項目を含む"address.coord" のように、配列項目の数が事前にわかっている場合にのみ使用してください。任意の数の項目を含むことができる"grades" のような配列の場合は、配列内のすべての値を読み取ることができるため代わりに自動スキーマ検出 に記載されている子テーブルの使用を検討してください。

CData Cloud

ユーザー定義関数

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.

Global Functions

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.

Scoped Functions

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]

CData Cloud

JSON 関数

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 }
]

JSON_EXTRACT

The JSON_EXTRACT function can extract individual values from a JSON object. The following query returns the values shown below based on the JSON path passed as the second argument to the function:
SELECT Name, JSON_EXTRACT(grades,'[0].grade') AS Grade, JSON_EXTRACT(grades,'[0].score') AS Score FROM Students;

Column NameExample Value
GradeA
Score2

JSON_COUNT

The JSON_COUNT function returns the number of elements in a JSON array within a JSON object. The following query returns the number of elements specified by the JSON path passed as the second argument to the function:
SELECT Name, JSON_COUNT(grades,'[x]') AS NumberOfGrades FROM Students;

Column NameExample Value
NumberOfGrades5

JSON_SUM

The JSON_SUM function returns the sum of the numeric values of a JSON array within a JSON object. The following query returns the total of the values specified by the JSON path passed as the second argument to the function:
SELECT Name, JSON_SUM(score,'[x].score') AS TotalScore FROM Students;

Column NameExample Value
TotalScore 41

JSON_MIN

The JSON_MIN function returns the lowest numeric value of a JSON array within a JSON object. The following query returns the minimum value specified by the JSON path passed as the second argument to the function:
SELECT Name, JSON_MIN(score,'[x].score') AS LowestScore FROM Students;

Column NameExample Value
LowestScore2

JSON_MAX

The JSON_MAX function returns the highest numeric value of a JSON array within a JSON object. The following query returns the maximum value specified by the JSON path passed as the second argument to the function:
SELECT Name, JSON_MAX(score,'[x].score') AS HighestScore FROM Students;

Column NameExample Value
HighestScore14

DOCUMENT

The DOCUMENT function can be used to return an document as a JSON string. DOCUMENT(*) can be used with any type of SELECT query, including queries including other columns, queries including just DOCUMENT(*), and even more complex queries like JOINs.
SELECT [Document.Id], grade, score, DOCUMENT(*) FROM grades
For 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}

When used alone, DOCUMENT(*) returns the structure directly from Couchbase as if a N1QL or SQL++ SELECT * query were used. This means that no Document.Id value will be present since Couchbase does not include it automatically.

SELECT DOCUMENT(*) FROM grades
This query would return:

DOCUMENT
{"grades":{"grade":"A","score":6"}}
{"grades":{"grade":"A","score":10"}}
{"grades":{"grade":"A","score":9"}}
{"grades":{"grade":"B","score":14"}}

CData Cloud

カスタムスキーマ定義

自動スキーマ検出 に加え、Cloud ではCouchbase オブジェクトのスキーマを統計的に定義することができます。 スキーマは、容易に拡張できるテキストベースのコンフィギュレーションファイルで定義されます。CreateSchema ストアドプロシージャを呼び出してスキーマファイルを生成できます。詳しくは、自動スキーマ検出 を参照してください。

Location プロパティをスキーマファイルを格納するファイルディレクトリに設定します。次のセクションでは、結果のスキーマを拡張する方法や自分で記述する方法について説明します。

サンプルドキュメント

次のドキュメントを考え、ネストプロパティを独自のカラムとして取得してみましょう:

/* 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>
カスタムスキーマ例 では、上の例を含む完全なスキーマを確認できます。

テーブルプロパティ

上のスキーマは次のプロパティを使って、すべてのテーブルの特定のquality を定義します。すべて必須です。

プロパティ 説明
other:dataverse データセットが属するDataverse の名前。Analytics ビューでない場合は空です。
other:bucket Couchbase 内のバケットまたはデータセットの名前。
other:flavorexpr フレーバーテーブル内のURL エンコード条件。例えば"%60docType%60%20%3D%20%22chess%22"。
other:flavorvalue フレーバーテーブル内のフレーバーの名前。例えば"chess"。
other:isarray テーブルが配列の子テーブルかどうか。
other:pathspec これは、other:childpath 内の区切り文字を解釈するために使用されます。詳しくはColumn Properties を参照してください。
other:childpath 子テーブルのUNNEST に使用される属性へのパス。子テーブルでない場合は空です。

カラムプロパティ

上のスキーマは次のプロパティを使って、それぞれのカラムの特定のquality を定義します:

プロパティ 説明
name 必須。カラムの名前。小文字。
key 主キーをマークするために使用されます。Document.Id では必須。その他のカラムでは任意。
xs:type 必須。Cloud 内のカラムのタイプ。
other:iskey 必須。キーと同じ値、またはキーが含まれていない場合は"false" にする必要があります。
other:pathspec 必須。これは、other:field 内の区切り文字を解釈するために使用されます。
other:field 必須。Couchbase のフィールドへのパス。

垂直方向のフラット化によって生成されるフィールドは、配列値とフィールド値を分離するために同じ構文を使用します。これにより、Cloud が"numeric_object.0" と"array.0" を公開するような場合にあいまいさが生じる可能性があります。

{
  "numeric_object": {
    "0": 0
  },
  "array": [
    0
  ]
}
Cloud がフィールドアクセスと配列アクセスを区別できるようにするために、pathspec はフィールド内の各"." が配列かオブジェクトかを判断するために使用されます。各"{" はフィールドアクセスを表し、各"[" は配列アクセスを表します。

例えば、フィールドが"a.0.b.1" で"pathspec" が"[{[" の場合、N1QL 式"a[0].b[1]" が生成されます。代わりに"pathspec" が"{{{" だった場合は、N1QL 式"a.`0`.b.`1`" が生成されます。

CData Cloud

カスタムスキーマ例

このセクションには、完全なスキーマが含まれています。Location プロパティをスキーマファイルを格納するファイルディレクトリに設定します。インフォセクションではCouchbase オブジェクトのリレーショナルビューを可能にします。詳細はカスタムスキーマ定義 を参照してください。次のテーブルではSELECT、INSERT、UPDATE、およびDELETE コマンドが以下のスキーマのGET、POST、MERGE、およびDELETE セクションとして実行されます。couchbaseadoSysData のような処理は内部の実行です。

<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>

CData Cloud

SSL の設定

SSL 設定のカスタマイズ

デフォルトでは、Cloud はサーバーとのTLS のネゴシエーションを試みます。サーバー証明書は、デフォルトのシステム信頼済み証明書ストアで検証されます。SSLServerCert 接続プロパティを使用して、証明書の検証方法をオーバーライドできます。

別の証明書を指定するには、SSLServerCert 接続プロパティを参照してください。

クライアントSSL 証明書

Couchbase Cloud はクライアント証明書の設定もサポートしています。次を設定すれば、クライアント証明書を使って接続できます。

  • SSLClientCert:クライアント証明書のための証明書ストア名。
  • SSLClientCertType:TLS / SSL クライアント証明書を格納するキーストアの種類。
  • SSLClientCertPassword:TLS / SSL クライアント証明書のパスワード。
  • SSLClientCertSubject:TLS / SSL クライアント証明書のサブジェクト。

CData Cloud

ファイアウォールとプロキシ

Firewall またはProxy 経由の接続

HTTP プロキシ

HTTP プロキシへの認証には、以下のように設定します。

  • ProxyServer:HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。
  • ProxyPort:プロキシサーバーが起動しているTCP ポート。
  • ProxyAuthScheme:プロキシサーバーに対して認証する際にCloud が使用する認証方法。
  • ProxyUser:プロキシサーバーに登録されているユーザーアカウントのユーザー名。
  • ProxyPassword:ProxyUser に紐付けられたパスワード。

その他のプロキシ

次のプロパティを設定します。

  • プロキシベースのファイヤーウォールを使用するには、FirewallType、FirewallServer、およびFirewallPort を設定します。
  • 接続をトンネルするには、FirewallType をTUNNEL に設定します。
  • 認証するには、FirewallUser とFirewallPassword を設定します。
  • SOCKS プロキシへの認証には、さらにFirewallType をSOCKS5 に設定します。

CData Cloud

データモデル

概要

使用されている接続設定に応じて、Cloud はCouchbase エンティティとリレーショナルテーブルおよびビューとの間に、いくつかの異なるマッピングを提示できます。これらの各機能の詳細については、このドキュメントのNoSQL の部分を参照してください。

  • N1QL クエリサービスに接続する場合、Cloud はCouchbase バケットをリレーショナルテーブルとしてモデル化します。さらに、TypeDetectionScheme がDocType またはInfer に設定されている場合は、Cloud は各バケット内のさまざまな種類のドキュメントを独自のテーブルとして表示します。
  • Analytics サービスに接続する場合、Cloud はCouchbase データセットをリレーショナルビューとしてモデル化します。
  • いずれかのサービスと接続する場合、Cloud はデータの配列を子テーブルまたはビューとして公開することができます。

Please see the 自動スキーマ検出 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.

Dataverses, Scopes and Collections

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

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

Live Metadata

All of the schemas provided by the 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

CData Cloud

ストアドプロシージャ

ストアドプロシージャはファンクションライクなインターフェースで、Couchbase の単純なSELECT/INSERT/UPDATE/DELETE 処理にとどまらずCloud の機能を拡張します。

ストアドプロシージャは、パラメータのリストを受け取り、目的の機能を実行し、プロシージャが成功したか失敗したかを示すとともにCouchbase から関連するレスポンスデータを返します。

CData Cloud - Couchbase ストアドプロシージャ

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.

CData Cloud

AddDocument

Upsert entire JSON documents to Couchbase as-is.

Input

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.

Result Set Columns

Name Type Description
RowsAffected String The number of rows successfully updated

CData Cloud

CreateBucket

Creates a new bucket in CouchBase.

バケットの作成

@AuthType が'none' のバケットは、@Name、@AuthType、@BucketType、および@RamQuotaMB のみ指定することで作成できます。接続しているCouchbase のバージョンによっては、@ProxyPort オプションも必要になる場合があります。

EXECUTE CreateBucket
  @Name = 'Players',
  @AuthType = 'NONE',
  @BucketType = 'COUCHBASE',
  @RamQuotaMB = 100,
  @ProxyPort = 1234

@AuthType が'sasl' のバケットを作成する場合は、@ProxyPort は指定しないでください。@SaslPassword は任意です。

EXECUTE CreateBucket
  @Name = 'Players',
  @AuthType = 'SASL',
  @BucketType = 'COUCHBASE',
  @RamQuotaMB = 100

他のすべてのパラメータは、@AuthType を何に指定するかにかかわらず使用できます。

Input

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.

Result Set Columns

Name Type Description
Success String Whether or not the bucket was successfully created.

CData Cloud

CreateCollection

Creates a collection under an existing scope

Input

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.

Result Set Columns

Name Type Description
Success Bool Whether or not the collection was successfully created.

CData Cloud

CreateScope

Creates a scope under an existing bucket

Input

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.

Result Set Columns

Name Type Description
Success Bool Whether or not the scope was successfully created.

CData Cloud

CreateSearchIndex

Creates a search index with the Search Service API in Couchbase.

Input

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.

Result Set Columns

Name Type Description
Success String Whether or not the index was successfully created or dropped.

CData Cloud

CreateUserTable

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:このプロシージャは、インデックス付きパラメータを使用します。 インデックス付きパラメータは、プロシージャの入力として単一のパラメータを複数のインスタンスに提供することを容易にします。

Param# という名前の入力パラメータがあるとします。このようなインデックス付きパラメータの複数のインスタンスを入力するには、次のように実行します。

EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"

以下の表では、インデックス付きの入力パラメータは、名前の末尾に '#' 文字が付きます。

Input

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

Result Set Columns

Name Type Description
AffectedTables String The number of tables created, either 0 or 1

CData Cloud

DeleteBucket

Deletes a bucket (and all its collections and scopes, where supported)

Input

Name Type Required Description
Name String True The name of the bucket to delete.

Result Set Columns

Name Type Description
Success Bool Whether or not the bucket was successfully deleted.

CData Cloud

DeleteCollection

Deletes a collection (Couchbase 7 and up)

Input

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.

Result Set Columns

Name Type Description
Success Bool Whether or not the collection was successfully deleted.

CData Cloud

DeleteScope

Deletes a scope and all its collections (Couchbase 7 and up)

Input

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.

Result Set Columns

Name Type Description
Success Bool Whether or not the scope was successfully deleted.

CData Cloud

ExecuteSearchIndex

Execute a search on an index using the Search Service API in Couchbase.

Input

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.

Result Set Columns

Name Type Description
Success String Whether or not the index was successfully created or dropped.

CData Cloud

FlushBucket

Removes all documents from a bucket in Couchbase.

Input

Name Type Required Description
Name String True The name of the bucket to delete. Flush must be enabled on this bucket.

Result Set Columns

Name Type Description
Success Bool Whether or not the bucket was successfully flushed.

CData Cloud

ListIndices

Lists all indices available in Couchbase

Result Set Columns

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

CData Cloud

ManageIndices

Creates/Drops an index in a target bucket in Couchbase.

インデックスの構築

匿名のプライマリインデックスはこれらのパラメータで作成できます。

EXECUTE ManageIndices
  @BucketName = 'Players'
  @Action = 'CREATE'
  @IsPrimary = 'true'
  @IndexType = 'VIEW'

これは、このN1QL を実行することと同じです。

CREATE PRIMARY INDEX ON `Players` USING VIEW

上記のパラメータに加えて、@Name を指定することで名前付きプライマリインデックスを作成できます。

EXECUTE ManageIndices
  @BucketName = 'Players'
  @Action = 'CREATE'
  @IsPrimary = 'true'
  @Name = 'Players_primary'
  @IndexType = 'VIEW'

セカンダリインデックスは、@IsPrimary をfalse に設定して、少なくとも1つの式を指定することで作成できます。

EXECUTE ManageIndices
  @BucketName = 'Players',
  @Action = 'CREATE',
  @IsPrimary = 'false',
  @Name = 'Players_playtime_score',
  @Expressions = '["score", "playtime"]'

これは、次のN1QL を実行することと同じです。

CREATE INDEX `Players_playtime_score` ON `Players`(score, playtime) USING GSI;

複数のノードとフィルタを指定して、より複雑なインデックスを生成することもできます。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"]'

これは、次の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"]};

Input

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.

デフォルト値は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.

デフォルト値は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.

Result Set Columns

Name Type Description
Success String Whether or not the index was successfully created or dropped.

CData Cloud

システムテーブル

このセクションで説明されているシステムテーブルをクエリして、スキーマ情報、データソース機能に関する情報、およびバッチ操作の統計にアクセスできます。

スキーマテーブル

以下のテーブルは、Couchbase のデータベースメタデータを返します。

  • sys_catalogs:利用可能なデータベースをリスト。
  • sys_schemas:利用可能なスキーマをリスト。
  • sys_tables:利用可能なテーブルおよびビューをリスト。
  • sys_tablecolumns:利用可能なテーブルおよびビューのカラムについて説明。
  • sys_procedures:利用可能なストアドプロシージャについて説明。
  • sys_procedureparameters:ストアドプロシージャパラメータについて説明。
  • sys_keycolumns:主キーおよび外部キーについて説明。
  • sys_indexes:利用可能なインデックスについて説明。

データソーステーブル

以下のテーブルは、データソースへの接続方法およびクエリ方法についての情報を返します。

  • sys_connection_props:利用可能な接続プロパティについての情報を返す。
  • sys_sqlinfo:Cloud がデータソースにオフロードできるSELECT クエリについて説明。

クエリ情報テーブル

次のテーブルは、データ変更クエリのクエリ統計を返します。

  • sys_identity:バッチ処理または単一の更新に関する情報を返す。

CData Cloud

sys_catalogs

利用可能なデータベースをリストします。

次のクエリは、接続文字列で決定されるすべてのデータベースを取得します。

SELECT * FROM sys_catalogs

Columns

Name Type Description
CatalogName String データベース名。

CData Cloud

sys_schemas

利用可能なスキーマをリストします。

次のクエリは、すべての利用可能なスキーマを取得します。

          SELECT * FROM sys_schemas
          

Columns

Name Type Description
CatalogName String データベース名。
SchemaName String スキーマ名。

CData Cloud

sys_tables

利用可能なテーブルをリストします。

次のクエリは、利用可能なテーブルおよびビューを取得します。

          SELECT * FROM sys_tables
          

Columns

Name Type Description
CatalogName String テーブルまたはビューを含むデータベース。
SchemaName String テーブルまたはビューを含むスキーマ。
TableName String テーブル名またはビュー名。
TableType String テーブルの種類(テーブルまたはビュー)。
Description String テーブルまたはビューの説明。
IsUpdateable Boolean テーブルが更新可能かどうか。

CData Cloud

sys_tablecolumns

利用可能なテーブルおよびビューのカラムについて説明します。

次のクエリは、[MyBucket].[MyScope].[Customer] テーブルのカラムとデータ型を返します。

SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='[MyBucket].[MyScope].[Customer]' 

Columns

Name Type Description
CatalogName String テーブルまたはビューを含むデータベースの名前。
SchemaName String テーブルまたはビューを含むスキーマ。
TableName String カラムを含むテーブルまたはビューの名前。
ColumnName String カラム名。
DataTypeName String データ型の名前。
DataType Int32 データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。
Length Int32 カラムのストレージサイズ。
DisplaySize Int32 指定されたカラムの通常の最大幅(文字数)。
NumericPrecision Int32 数値データの最大桁数。文字データおよび日時データの場合は、カラムの長さ(文字数)。
NumericScale Int32 カラムのスケール(小数点以下の桁数)。
IsNullable Boolean カラムがNull を含められるかどうか。
Description String カラムの簡単な説明。
Ordinal Int32 カラムのシーケンスナンバー。
IsAutoIncrement String カラムに固定増分値が割り当てられるかどうか。
IsGeneratedColumn String 生成されたカラムであるかどうか。
IsHidden Boolean カラムが非表示かどうか。
IsArray Boolean カラムが配列かどうか。
IsReadOnly Boolean カラムが読み取り専用かどうか。
IsKey Boolean sys_tablecolumns から返されたフィールドがテーブルの主キーであるかどうか。
ColumnType String スキーマ内のカラムの役割または分類。可能な値は、SYSTEM、LINKEDCOLUMN、NAVIGATIONKEY、REFERENCECOLUMN、およびNAVIGATIONPARENTCOLUMN が含まれます。

CData Cloud

sys_procedures

利用可能なストアドプロシージャをリストします。

次のクエリは、利用可能なストアドプロシージャを取得します。

          SELECT * FROM sys_procedures
          

Columns

Name Type Description
CatalogName String ストアドプロシージャを含むデータベース。
SchemaName String ストアドプロシージャを含むスキーマ。
ProcedureName String ストアドプロシージャの名前。
Description String ストアドプロシージャの説明。
ProcedureType String PROCEDURE やFUNCTION などのプロシージャのタイプ。

CData Cloud

sys_procedureparameters

ストアドプロシージャパラメータについて説明します。

次のクエリは、SelectEntries ストアドプロシージャのすべての入力パラメータについての情報を返します。

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'SelectEntries' AND Direction = 1 OR Direction = 2

パラメータに加えて結果セットのカラムを含めるには、IncludeResultColumns 擬似カラムをTrue に設定します。

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'SelectEntries' AND IncludeResultColumns='True'

Columns

Name Type Description
CatalogName String ストアドプロシージャを含むデータベースの名前。
SchemaName String ストアドプロシージャを含むスキーマの名前。
ProcedureName String パラメータを含むストアドプロシージャの名前。
ColumnName String ストアドプロシージャパラメータの名前。
Direction Int32 パラメータのタイプに対応する整数値:input (1)。input/output (2)、またはoutput(4)。input/output タイプパラメータは、入力パラメータと出力パラメータの両方になれます。
DataType Int32 データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。
DataTypeName String データ型の名前。
NumericPrecision Int32 数値データの場合は最大精度。文字データおよび日時データの場合は、カラムの長さ(文字数)。
Length Int32 文字データの場合は、許可される文字数。数値データの場合は、許可される桁数。
NumericScale Int32 数値データの小数点以下の桁数。
IsNullable Boolean パラメータがNull を含められるかどうか。
IsRequired Boolean プロシージャの実行にパラメータが必要かどうか。
IsArray Boolean パラメータが配列かどうか。
Description String パラメータの説明。
Ordinal Int32 パラメータのインデックス。
Values String このパラメータで設定できる値は、このカラムに表示されるものに限られます。指定できる値はカンマ区切りです。
SupportsStreams Boolean パラメータがファイルを表すかどうか。ファイルは、ファイルパスとして渡すことも、ストリームとして渡すこともできます。
IsPath Boolean パラメータがスキーマ作成操作のターゲットパスかどうか。
Default String 何も値が指定されていない場合に、このパラメータで使用される値。
SpecificName String 複数のストアドプロシージャが同じ名前を持つ場合、それぞれの同名のストアドプロシージャを一意に識別するラベル。特定の名前を持つプロシージャが1つだけの場合は、その名前がここに単純に反映されます。
IsCDataProvided Boolean プロシージャがネイティブのCouchbase プロシージャではなく、CData によって追加 / 実装されているかどうか。

Pseudo-Columns

Name Type Description
IncludeResultColumns Boolean 出力にパラメータに加えて結果セットのカラムを含めるかどうか。デフォルトはFalse です。

CData Cloud

sys_keycolumns

主キーおよび外部キーについて説明します。

次のクエリは、[MyBucket].[MyScope].[Customer] テーブルの主キーを取得します。

         SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='[MyBucket].[MyScope].[Customer]' 
          

Columns

Name Type Description
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前
IsKey Boolean カラムがTableName フィールドで参照されるテーブル内の主キーかどうか。
IsForeignKey Boolean カラムがTableName フィールドで参照される外部キーかどうか。
PrimaryKeyName String 主キーの名前。
ForeignKeyName String 外部キーの名前。
ReferencedCatalogName String 主キーを含むデータベース。
ReferencedSchemaName String 主キーを含むスキーマ。
ReferencedTableName String 主キーを含むテーブル。
ReferencedColumnName String 主キーのカラム名。

CData Cloud

sys_foreignkeys

外部キーについて説明します。

次のクエリは、他のテーブルを参照するすべての外部キーを取得します。

         SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
          

カラム

名前 タイプ 説明
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前
PrimaryKeyName String 主キーの名前。
ForeignKeyName String 外部キーの名前。
ReferencedCatalogName String 主キーを含むデータベース。
ReferencedSchemaName String 主キーを含むスキーマ。
ReferencedTableName String 主キーを含むテーブル。
ReferencedColumnName String 主キーのカラム名。
ForeignKeyType String 外部キーがインポート(他のテーブルを指す)キーかエクスポート(他のテーブルから参照される)キーかを指定します。

CData Cloud

sys_primarykeys

主キーについて説明します。

次のクエリは、すべてのテーブルとビューから主キーを取得します。

         SELECT * FROM sys_primarykeys
          

Columns

Name Type Description
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前。
KeySeq String 主キーのシーケンス番号。
KeyName String 主キーの名前。

CData Cloud

sys_indexes

利用可能なインデックスについて説明します。インデックスをフィルタリングすることで、より高速なクエリ応答時間でセレクティブクエリを記述できます。

次のクエリは、主キーでないすべてのインデックスを取得します。

          SELECT * FROM sys_indexes WHERE IsPrimary='false'
          

Columns

Name Type Description
CatalogName String インデックスを含むデータベースの名前。
SchemaName String インデックスを含むスキーマの名前。
TableName String インデックスを含むテーブルの名前。
IndexName String インデックス名。
ColumnName String インデックスに関連付けられたカラムの名前。
IsUnique Boolean インデックスが固有の場合はTrue。そうでない場合はFalse。
IsPrimary Boolean インデックスが主キーの場合はTrue。そうでない場合はFalse。
Type Int16 インデックスタイプに対応する整数値:statistic (0)、clustered (1)、hashed (2)、またはother (3)。
SortOrder String 並べ替え順序:A が昇順、D が降順。
OrdinalPosition Int16 インデックスのカラムのシーケンスナンバー。

CData Cloud

sys_connection_props

利用可能な接続プロパティと、接続文字列に設定されている接続プロパティに関する情報を返します。

次のクエリは、接続文字列に設定されている、あるいはデフォルト値で設定されているすべての接続プロパティを取得します。

SELECT * FROM sys_connection_props WHERE Value <> ''

Columns

Name Type Description
Name String 接続プロパティ名。
ShortDescription String 簡単な説明。
Type String 接続プロパティのデータ型。
Default String 明示的に設定されていない場合のデフォルト値。
Values String 可能な値のカンマ区切りリスト。別な値が指定されていると、検証エラーがスローされます。
Value String 設定した値またはあらかじめ設定されたデフォルト。
Required Boolean プロパティが接続に必要かどうか。
Category String 接続プロパティのカテゴリ。
IsSessionProperty String プロパティが、現在の接続に関する情報を保存するために使用されるセッションプロパティかどうか。
Sensitivity String プロパティの機密度。これは、プロパティがロギングおよび認証フォームで難読化されているかどうかを通知します。
PropertyName String キャメルケースの短縮形の接続プロパティ名。
Ordinal Int32 パラメータのインデックス。
CatOrdinal Int32 パラメータカテゴリのインデックス。
Hierarchy String このプロパティと一緒に設定する必要がある、関連のある依存プロパティを表示します。
Visible Boolean プロパティが接続UI に表示されるかどうかを通知します。
ETC String プロパティに関するその他のさまざまな情報。

CData Cloud

sys_sqlinfo

Cloud がデータソースにオフロードできるSELECT クエリ処理について説明します。

SQL 構文の詳細については、SQL 準拠 を参照してください。

データソースのSELECT 機能

以下はSQL 機能のサンプルデータセットです。 SELECT 機能のいくつかの側面がサポートされている場合には、カンマ区切りのリストで返されます。サポートされていない場合、カラムにはNO が入ります。

名前説明有効な値
AGGREGATE_FUNCTIONSサポートされている集計関数。AVG, COUNT, MAX, MIN, SUM, DISTINCT
COUNTCOUNT 関数がサポートされているかどうか。YES, NO
IDENTIFIER_QUOTE_OPEN_CHAR識別子をエスケープするための開始文字。[
IDENTIFIER_QUOTE_CLOSE_CHAR識別子をエスケープするための終了文字。]
SUPPORTED_OPERATORSサポートされているSQL 演算子。=, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR
GROUP_BYGROUP BY がサポートされているかどうか。サポートされている場合、どのレベルでサポートされているか。NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE
OJ_CAPABILITIESサポートされている外部結合の種類。NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS
OUTER_JOINS外部結合がサポートされているかどうか。YES, NO
SUBQUERIESサブクエリがサポートされているかどうか。サポートされていれば、どのレベルでサポートされているか。NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED
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サポートされている数値関数。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サポートされている日付および時刻関数。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レプリケーション中にスキップされたテーブルを示します。
REPLICATION_TIMECHECK_COLUMNSレプリケーション中に更新判断のカラムとして使用するかどうかを、(指定された順に)チェックするカラムのリストを含む文字列の配列。
IDENTIFIER_PATTERN識別子としてどの文字列が有効かを示す文字列値。
SUPPORT_TRANSACTIONプロバイダーが、コミットやロールバックなどのトランザクションをサポートしているかどうかを示します。YES, NO
DIALECT使用するSQL ダイアレクトを示します。
KEY_PROPERTIESUniform データベースを特定するプロパティを示します。
SUPPORTS_MULTIPLE_SCHEMASプロバイダー用に複数のスキームが存在するかどうかを示します。YES, NO
SUPPORTS_MULTIPLE_CATALOGSプロバイダー用に複数のカタログが存在するかどうかを示します。YES, NO
DATASYNCVERSIONこのドライバーにアクセスするために必要な、CData Sync のバージョン。Standard, Starter, Professional, Enterprise
DATASYNCCATEGORYこのドライバーのCData Sync カテゴリ。Source, Destination, Cloud Destination
SUPPORTSENHANCEDSQLAPI で提供されている以上の、追加SQL 機能がサポートされているかどうか。TRUE, FALSE
SUPPORTS_BATCH_OPERATIONSバッチ操作がサポートされているかどうか。YES, NO
SQL_CAPこのドライバーでサポートされているすべてのSQL 機能。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使用したいcacheOptions を指定する文字列値。
ENABLE_EF_ADVANCED_QUERYドライバーがEntity Framework の高度なクエリをサポートしているかどうかを示します。サポートしていなければ、クエリはクライアントサイドで処理されます。YES, NO
PSEUDO_COLUMNS利用可能な疑似カラムを示す文字列の配列。
MERGE_ALWAYS値がtrue であれば、CData Sync 内でMerge Model が強制的に実行されます。TRUE, FALSE
REPLICATION_MIN_DATE_QUERYレプリケート開始日時を返すSELECT クエリ。
REPLICATION_MIN_FUNCTIONサーバーサイドでmin を実行するために使用する式名を、プロバイダーが指定できるようになります。
REPLICATION_START_DATEレプリケート開始日を、プロバイダーが指定できるようになります。
REPLICATION_MAX_DATE_QUERYレプリケート終了日時を返すSELECT クエリ。
REPLICATION_MAX_FUNCTIONサーバーサイドでmax を実行するために使用する式名を、プロバイダーが指定できるようになります。
IGNORE_INTERVALS_ON_INITIAL_REPLICATE初回のレプリケートで、レプリケートをチャンクに分割しないテーブルのリスト。
CHECKCACHE_USE_PARENTIDCheckCache 構文を親キーカラムに対して実行するかどうかを示します。TRUE, FALSE
CREATE_SCHEMA_PROCEDURESスキーマファイルの生成に使用できる、ストアドプロシージャを示します。

次のクエリは、WHERE 句で使用できる演算子を取得します。

SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
WHERE 句では、個々のテーブルの制限や要件が異なる場合がありますので注意してください。詳しくは、データモデル セクションを参照してください。

Columns

Name Type Description
NAME String SQL 構文のコンポーネント、またはサーバー上で処理できる機能。
VALUE String サポートされるSQL またはSQL 構文の詳細。

CData Cloud

sys_identity

試行された変更に関する情報を返します。

次のクエリは、バッチ処理で変更された行のId を取得します。

         SELECT * FROM sys_identity
          

Columns

Name Type Description
Id String データ変更処理から返された、データベース生成Id。
Batch String バッチの識別子。1 は単一処理。
Operation String バッチ内の処理の結果:INSERTED、UPDATED、またはDELETED。
Message String SUCCESS、またはバッチ内の更新が失敗した場合のエラーメッセージ。

CData Cloud

sys_information

利用可能なシステム情報を説明します。

次のクエリは、すべてのカラムを取得します。

SELECT * FROM sys_information

Columns

NameTypeDescription
ProductString製品名。
VersionString製品のバージョン番号。
DatasourceString製品が接続するデータソースの名前。
NodeIdString製品がインストールされているマシンの固有識別子。
HelpURLString製品のヘルプドキュメントのURL。
LicenseString製品のライセンス情報。(この情報が利用できない場合、この項目は空白のままか「N/A」と表示されます。)
LocationString製品のライブラリが格納されているファイルパスの場所。
EnvironmentString製品が現在稼働している環境またはランタイムのバージョン。
DataSyncVersionString本コネクタを使用するために必要なCData Sync のティア。
DataSyncCategoryStringCData Sync 機能のカテゴリ(例:Source、Destination)。

CData Cloud

接続文字列オプション

接続文字列プロパティは、接続を確立するために使用できるさまざまなオプションです。このセクションでは、本プロバイダーの接続文字列で設定できるオプションの一覧を示します。詳細については各リンクをクリックしてください。

Authentication


プロパティ説明
AuthSchemeThe type of authentication to use when connecting to Couchbase.
User認証するユーザーのユーザーID を指定します。
Password認証するユーザーのパスワードを指定します。
Server接続するCouchbase サーバーのアドレス。
CouchbaseService接続するCouchbase サービスを決定します。デフォルトはN1QL です。利用可能なオプションはN1QL とAnalytics です。
ConnectionModeDetermines how to connect to the Couchbase server. Must be either Direct or Cloud.
DNSServerDetermines what DNS server to use when retrieving Couchbase Capella information.
N1QLPortCouchbase N1QL Endpoint に接続するポートまたはURL。
AnalyticsPortCouchbase Analytics Endpoint に接続するポートまたはURL。
WebConsolePortCouchbase Web Console に接続するポートまたはURL。
SearchPortThe port or URL for connecting to the Couchbase Search Service Endpoint.

SSL


プロパティ説明
SSLClientCertSSL クライアント認証(2-way SSL)のためのTLS/SSL クライアント証明書ストアを指定します。このプロパティは、他のSSL 関連プロパティと連動して、セキュアな接続を確立します。
SSLClientCertTypeSSL クライアント認証用のTLS/SSL クライアント証明書を格納するキーストアの種類を指定します。プラットフォームや証明書のソースに応じて、さまざまなキーストア形式から選択できます。
SSLClientCertPasswordTLS/SSL クライアント証明書ストアにアクセスするために必要なパスワードを指定します。選択した証明書ストアの種類がアクセスにパスワードを必要とする場合、このプロパティを使用します。
SSLClientCertSubjectTLS/SSL クライアント証明書のサブジェクトを指定し、証明書ストアで場所を検索します。 CN=www.server.com, C=US のように、識別名フィールドのカンマ区切りのリストを使用します。ワイルドカード * は、ストアの先頭の証明書を選択します。
UseSSLCouchbase サーバーに接続するときにTLS/SSL をネゴシエートするかどうか。
SSLServerCertTLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。

Logging


プロパティ説明
VerbosityログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。

Schema


プロパティ説明
BrowsableSchemasレポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
Dataverseテーブルを検出するときにどのAnalysis dataverse をスキャンするか。
TypeDetectionSchemeprovider がCouchbase にあるバケットからテーブルとカラムをどのように作成するかを決定します。
InferNumSampleValuesデータ型を決定する前にスキャンする各フィールドの値の最大数。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
InferSampleSizeバケット内で利用可能なカラムを探すためにスキャンするドキュメント数の最大値。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
InferSimilarityMetric異なるスキーマが同じフレーバーだと見なされる類似度を指定します。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
FlexibleSchemasWhether the provider allows queries to use columns that it has not discovered.
ExposeTTLSpecifies whether document TTL information should be exposed.
NumericStringsWhether to allow string values to be treated as numbers.
IgnoreChildAggregatesWhether the provider exposes aggregate columns that are also available as child tables. Ignored if TableSupport is not set to Full.
TableSupportprovider がCouchbase サーバー上のテーブルを検出するためにどれだけの努力をするか。
NewChildJoinsModeDetermines the kind of child table model the provider exposes.

Miscellaneous


プロパティ説明
ChildSeparator子テーブルを示すために使用する記号。
CreateTableRamQuotaThe default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax.
DataverseSeparatorAnalytics dataverse およびscopes/collections を示すために使用する記号。
FlattenArraysThe number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled.
FlattenObjectsフラット化されたオブジェクトプロパティとしてカラムを表示するには、 FlattenObjects をtrue に設定します。そうでなければ、配列にネストされたオブジェクトはJSON 文字列として返されます。
FlavorSeparatorフレーバーを示すために使用する記号。
InsertNullValuesDetermines whether an INSERT should include fields that have NULL values.
MaxRows集計やGROUP BY を含まないクエリで返される最大行数を指定します。
Pagesizeprovider がCouchbase にデータをリクエストするときに返す、ページあたりの最大レコード数を指定します。
PeriodsSeparator階層を示すために使用する記号。
PseudoColumnsテーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。
QueryExecutionTimeoutクエリのサーバーサイドのタイムアウトを設定します。タイムアウトエラーを返す前にCouchbase がクエリを実行する期間を決定します。
RowScanDepthテーブルで利用可能なカラムを探すためにスキャンする行数の最大値。
StrictComparisonSQL 入力クエリのフィルタをCouchbase クエリに変換する精度を調整します。 これは、値のカンマ区切りリストに設定できます。各値はdate、number、boolean、またはstring のいずれかです。
Timeoutprovider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。
TransactionDurabilitySpecifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries.
TransactionTimeoutThis sets the amount of time a transaction may execute before it is timed out by Couchbase.
UpdateNullValuesDetermines whether an UPDATE writes NULL values as NULL, or removes them.
UseCollectionsForDDLWhether 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.
UseTransactionsSpecifies whether to use N1QL transactions when executing queries.
CData Cloud

Authentication

このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。


プロパティ説明
AuthSchemeThe type of authentication to use when connecting to Couchbase.
User認証するユーザーのユーザーID を指定します。
Password認証するユーザーのパスワードを指定します。
Server接続するCouchbase サーバーのアドレス。
CouchbaseService接続するCouchbase サービスを決定します。デフォルトはN1QL です。利用可能なオプションはN1QL とAnalytics です。
ConnectionModeDetermines how to connect to the Couchbase server. Must be either Direct or Cloud.
DNSServerDetermines what DNS server to use when retrieving Couchbase Capella information.
N1QLPortCouchbase N1QL Endpoint に接続するポートまたはURL。
AnalyticsPortCouchbase Analytics Endpoint に接続するポートまたはURL。
WebConsolePortCouchbase Web Console に接続するポートまたはURL。
SearchPortThe port or URL for connecting to the Couchbase Search Service Endpoint.
CData Cloud

AuthScheme

The type of authentication to use when connecting to Couchbase.

Possible Values

Basic, SSLCertificate

データ型

string

デフォルト値

"Basic"

解説

  • Basic: Uses HTTP Basic authentication with User and Password.
  • CredentialsFile: Uses a credentials file. This will require that the CredentialsFile property be set.
  • SSLCertificate: Uses SSL client certificate authentication. Requires that UseSSL be enabled and that SSLClientCert and SSLClientCertType be set.

Note that only Basic authentication is supported when using the "Cloud" ConnectionMode.

CData Cloud

User

認証するユーザーのユーザーID を指定します。

データ型

string

デフォルト値

""

解説

認証サーバーは、ユーザーのID を検証するためにUser とPassword の両方を必要とします。

CData Cloud

Password

認証するユーザーのパスワードを指定します。

データ型

string

デフォルト値

""

解説

認証サーバーは、ユーザーのID を検証するためにUser とPassword の両方を必要とします。

CData Cloud

Server

接続するCouchbase サーバーのアドレス。

データ型

string

デフォルト値

""

解説

この値は、"couchbase-server.com" や"1.2.3.4" のように、ホスト名またはIP アドレスに設定できます。また、 "https://couchbase-server.com" や"http://1.2.3.4" のように、HTTP またはHTTPS URL に設定することもできます。If ConnectionMode is set to Cloud then this should be the hostname of the Couchbase Cloud instance as reported in the control panel.

URL 形式が使用される場合、このオプションを設定するとUseSSL オプションも設定されます。URL スキームが "https://" の場合UseSSL はtrue に設定され、"http://" の場合はUseSSL はfalse に設定されます。

このオプションの一部としてポート値は許容されていないため、"http://couchbase-server.com:8093" のような値は使用できません。WebConsolePort、N1QLPort、およびAnalyticsPort を使用してください。

この値は、"1.2.3.4, couchbase-server.com" のように、カンマで区切られた上記の形式で複数のサーバーを受け入れることもできます。これにより、リストされているサーバーにアクセスできない場合に、Cloud が接続を回復できるようになります。

Cloud は接続全体を回復しようとしますが、個々の操作を失う可能性があります。例えば、クエリの実行中にサーバーにアクセスできなくなった場合、長期実行クエリは失敗しますが、そのクエリは同じ接続で再試行でき、Cloud は次のアクティブなサーバーでそのクエリを実行します。

CData Cloud

CouchbaseService

接続するCouchbase サービスを決定します。デフォルトはN1QL です。利用可能なオプションはN1QL とAnalytics です。

Possible Values

N1QL, Analytics

データ型

string

デフォルト値

"N1QL"

解説

接続するCouchbase サービスを決定します。デフォルトはN1QL です。利用可能なオプションはN1QL とAnalytics です。

CData Cloud

ConnectionMode

Determines how to connect to the Couchbase server. Must be either Direct or Cloud.

Possible Values

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:

  • Server
  • N1QLPort
  • AnalyticsPort

CData Cloud

DNSServer

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

CData Cloud

N1QLPort

Couchbase N1QL Endpoint に接続するポートまたはURL。

データ型

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. SSL を使用していない場合のデフォルトは8093 で、SSL を使用している場合のデフォルトは18093 になります。UseSSL を参照してください。

This option can be set one of two ways:

  • As a port number like "1234". With this setting the Cloud will send N1QL queries to the endpoint http://Server:N1QLPort/query/service. (or https:// if Server is https:// or UseSSL is enabled).
  • As a full URL like "http://couchbase.example:1234/proxy". With this setting the Cloud send N1QL queries using the endpoint you specify. For example, if you use that URL then N1QL requests will go to http://couchbase.example:1234/proxy/query/serivce. Server and UseSSL are ignored for N1QL requests.

CData Cloud

AnalyticsPort

Couchbase Analytics Endpoint に接続するポートまたはURL。

データ型

string

デフォルト値

""

解説

This port is used for submitting queries when CouchbaseService is set to Analytics. SSL を使用していない場合のデフォルトは8095 で、SSL を使用している場合のデフォルトは18095 になります。UseSSL を参照してください。

This option can be set one of two ways:

  • As a port number like "1234". With this setting the Cloud will send Analytics queries to the endpoint http://Server:AnalyticsPort/analytics/service (or https:// if Server is https:// or UseSSL is enabled).
  • As a full URL like "http://couchbase.example:1234/proxy". With this setting the Cloud send Analytics queries using the endpoint you specify. For example, if you use that URL then Analytics requests will go to http://couchbase.example:1234/proxy/analytics/serivce. Server and UseSSL are ignored for Analytics requests.

CData Cloud

WebConsolePort

Couchbase Web Console に接続するポートまたはURL。

データ型

string

デフォルト値

""

解説

This port is used for API operations like managing buckets. SSL を使用していない場合のデフォルトは8091 で、SSL を使用している場合のデフォルトは18091 になります。UseSSL を参照してください。

This option can be set one of two ways:

  • As a port number like "1234". With this setting the Cloud will send management requests to http://Server:WebConsolePort/. The exact endpoint depends upon the operation being used. For example, the cluster status request will go to the endpoint http://Server:WebConsolePort/pools.
  • As a full URL like "http://couchbase.example:1234/proxy". With this setting the Cloud will send Web Console queries using the endpoint you specify. For example, if you use that URL then the cluster status request (normally at /pools) will go to http://couchbase.example:1234/proxy/pools. Server and UseSSL are ignored for web console requests.

CData Cloud

SearchPort

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:

  • As a port number like "1234". With this setting the Cloud will send Search Service queries to the endpoint http://Server:SearchPort/api/index/ (or https:// if Server is https:// or UseSSL is enabled).
  • As a full URL like "http://couchbase.example:1234/proxy". With this setting the Cloud send Search Service queries using the endpoint you specify. For example, if you use that URL then Search Service requests will go to http://couchbase.example:1234/proxy/api/index/. Server and UseSSL are ignored for Search Service requests.

CData Cloud

SSL

このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。


プロパティ説明
SSLClientCertSSL クライアント認証(2-way SSL)のためのTLS/SSL クライアント証明書ストアを指定します。このプロパティは、他のSSL 関連プロパティと連動して、セキュアな接続を確立します。
SSLClientCertTypeSSL クライアント認証用のTLS/SSL クライアント証明書を格納するキーストアの種類を指定します。プラットフォームや証明書のソースに応じて、さまざまなキーストア形式から選択できます。
SSLClientCertPasswordTLS/SSL クライアント証明書ストアにアクセスするために必要なパスワードを指定します。選択した証明書ストアの種類がアクセスにパスワードを必要とする場合、このプロパティを使用します。
SSLClientCertSubjectTLS/SSL クライアント証明書のサブジェクトを指定し、証明書ストアで場所を検索します。 CN=www.server.com, C=US のように、識別名フィールドのカンマ区切りのリストを使用します。ワイルドカード * は、ストアの先頭の証明書を選択します。
UseSSLCouchbase サーバーに接続するときにTLS/SSL をネゴシエートするかどうか。
SSLServerCertTLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。
CData Cloud

SSLClientCert

SSL クライアント認証(2-way SSL)のためのTLS/SSL クライアント証明書ストアを指定します。このプロパティは、他のSSL 関連プロパティと連動して、セキュアな接続を確立します。

データ型

string

デフォルト値

""

解説

このプロパティは、SSL クライアント認証のためのクライアント証明書ストアを指定します。 このプロパティは、証明書ストアの種類を定義するSSLClientCertType、およびパスワードで保護されたストア用のパスワードを指定するSSLClientCertPassword と一緒に使用します。 SSLClientCert が設定され、SSLClientCertSubject が設定されている場合、ドライバーは指定されたサブジェクトに一致する証明書を検索します。

証明書ストアの指定はプラットフォームによって異なります。 Windowsでは、証明書ストアはMY(個人証明書)などの名前で識別されますが、Java では、証明書ストアは通常、証明書とオプションの秘密キーを含むファイルです。

Windows の共通のユーザとシステム証明書ストアの指定は以下のとおりです。

MY個人証明書と関連付けられた秘密キーを格納している証明書ストア。
CA証明機関の証明書。
ROOTルート証明書。
SPCソフトウェア発行元証明書。

PFXFile タイプの場合、このプロパティをファイル名に設定します。PFXBlob タイプの場合は、このプロパティをPKCS12 形式のファイルのバイナリコンテンツに設定します。

CData Cloud

SSLClientCertType

SSL クライアント認証用のTLS/SSL クライアント証明書を格納するキーストアの種類を指定します。プラットフォームや証明書のソースに応じて、さまざまなキーストア形式から選択できます。

Possible Values

PFXBLOB, JKSBLOB, PEMKEY_BLOB, PUBLIC_KEY_BLOB, SSHPUBLIC_KEY_BLOB, XMLBLOB, BCFKSBLOB

データ型

string

デフォルト値

"PEMKEY_BLOB"

解説

このプロパティは、クライアント証明書を指定するために使用されるキーストアの形式と場所を決定します。 サポートされている値には、プラットフォーム固有およびユニバーサルなキーストア形式があります。 有効な値と使用方法は以下のとおりです。

USER - デフォルトWindows の場合、現在のユーザーにより所有された証明書ストアであることを指定します。この種類はJava では利用できませんので注意してください。
MACHINEWindows の場合、この証明書ストアがシステムストアであることを指定します。この種類はJava では利用できませんので注意してください。
PFXFILEこの証明書ストアは、証明書を含むPFX(PKCS12)ファイルの名前です。
PFXBLOBこの証明書ストアは、PFX(PKCS12)形式の証明書ストアを表すBase-64でエンコードされた文字列です。
JKSFILEこの証明書ストアは、証明書を含むJava key store(JKS)ファイルの名前です。この種類はJava でのみ利用できますので注意してください。
JKSBLOBこの証明書ストアは、Java key store(JKS)形式の証明書ストアを表すBase-64でエンコードされた文字列です。この種類はJava でのみ利用できますので注意してください。
PEMKEY_FILEこの証明書ストアは、秘密キーと任意の証明書を含むPEM でエンコードされたファイルの名前です。
PEMKEY_BLOBこの証明書ストアは、秘密キーと任意の証明書を含むBase-64でエンコードされた文字列です。
PUBLIC_KEY_FILEこの証明書ストアは、PEM またはDER でエンコードされた公開キーの証明書を含むファイルの名前です。
PUBLIC_KEY_BLOBこの証明書ストアは、PEM またはDER でエンコードされた公開キーの証明書を含むBase-64でエンコードされた文字列です。
SSHPUBLIC_KEY_FILEこの証明書ストアは、SSH 公開キーを含むファイルの名前です。
SSHPUBLIC_KEY_BLOBこの証明書ストアは、SSH 公開キーを含むBase-64でエンコードされた文字列です。
P7BFILEこの証明書ストアは、証明書を含むPKCS7 ファイルの名前です。
PPKFILEこの証明書ストアは、PuTTY 秘密キー(PPK)を含むファイルの名前です。
XMLFILEこの証明書ストアは、XML 形式の証明書を含むファイルの名前です。
XMLBLOBこの証明書ストアは、XML 形式の証明書を含む文字列の名前です。
BCFKSFILEこの証明書ストアは、Bouncy Castle キーストアを含むファイルの名前です。
BCFKSBLOBこの証明書ストアは、Bouncy Castle キーストアを含む文字列(Base-64エンコード)です。

CData Cloud

SSLClientCertPassword

TLS/SSL クライアント証明書ストアにアクセスするために必要なパスワードを指定します。選択した証明書ストアの種類がアクセスにパスワードを必要とする場合、このプロパティを使用します。

データ型

string

デフォルト値

""

解説

このプロパティは、パスワードで保護された証明書ストアを開くために必要なパスワードを指定します。 このプロパティは、PFX やJKS タイプのストアによく推奨されるように、復号化のためにパスワードを必要とする証明書ストアを使用する場合に必要です。

証明書ストアの種類がパスワードを必要としない場合(Windows のUSER やMACHINE など)、このプロパティは空白のままにできます。 認証エラーを回避するため、パスワードが指定された証明書ストアに関連付けられたものと一致していることを確認してください。

CData Cloud

SSLClientCertSubject

TLS/SSL クライアント証明書のサブジェクトを指定し、証明書ストアで場所を検索します。 CN=www.server.com, C=US のように、識別名フィールドのカンマ区切りのリストを使用します。ワイルドカード * は、ストアの先頭の証明書を選択します。

データ型

string

デフォルト値

"*"

解説

このプロパティは、サブジェクトに基づいてロードするクライアント証明書を決定します。Cloud は、指定されたサブジェクトに完全に一致する証明書を検索します。 完全に一致するものが見つからない場合、Cloud はサブジェクトの値を含む証明書を検索します。 一致する証明書がない場合、証明書は選択されません。

サブジェクトは、識別名フィールドと値のカンマ区切りリストという標準の形式に従うべきです。 例えば、CN=www.server.com, OU=Test, C=US です。一般的なフィールドには以下のものが含まれます。

フィールド説明
CN共通名。一般的には、www.server.com のようなホスト名です。
O法人名
OU法人の部署名
L法人の住所(市町村名)
S法人の住所(都道府県)
C国名
EE メールアドレス

Note: フィールドにカンマなどの特殊文字が含まれている場合は、値を引用符で囲む必要があります。例:CN="Example, Inc.", C=US。

CData Cloud

UseSSL

Couchbase サーバーに接続するときにTLS/SSL をネゴシエートするかどうか。

データ型

bool

デフォルト値

true

解説

これがtrue に設定されている場合、以下のオプションのデフォルトが変更されます。

プロパティ Plaintext デフォルト SSL デフォルト
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.

CData Cloud

SSLServerCert

TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。

データ型

string

デフォルト値

""

解説

TLS/SSL 接続を使用している場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。このプロパティに値を指定すると、マシンによって信頼されていない他の証明書はすべて拒否されます。

このプロパティは、次のフォームを取ります:

説明 例
フルPEM 証明書(例では省略されています) -----BEGIN CERTIFICATE-----
MIIChTCCAe4CAQAwDQYJKoZIhv......Qw==
-----END CERTIFICATE-----
証明書を保有するローカルファイルへのパス。 C:\cert.cer
公開鍵(例では省略されています) -----BEGIN RSA PUBLIC KEY-----
MIGfMA0GCSq......AQAB
-----END RSA PUBLIC KEY-----
MD5 Thumbprint(hex 値はスペースまたはコロン区切り) ecadbdda5a1529c58a1e9e09828d70e4
SHA1 Thumbprint(hex 値はスペースまたはコロン区切り) 34a929226ae0819f2ec14b4a3d904f801cbb150d

Note:'*' を使用してすべての証明書を受け入れるように指定することも可能ですが、セキュリティ上の懸念があるため推奨されません。

CData Cloud

Logging

このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。


プロパティ説明
VerbosityログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。
CData Cloud

Verbosity

ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。

データ型

string

デフォルト値

"1"

解説

このプロパティは、Cloud がログファイルに含める詳細レベルを定義します。 Verbosity レベルを高くするとログに記録される情報の詳細が増えますが、ログファイルが大きくなり取り込まれるデータが増えるためパフォーマンスが低下する可能性があります。

デフォルトのVerbosity レベルは1で、通常の運用にはこれが推奨されます。 より高いVerbosity レベルは主にデバッグを目的としています。 各レベルの詳細については、ログ を参照してください。

LogModules プロパティと組み合わせることで、Verbosity は特定の情報カテゴリに対するログの詳細度を調整できます。

CData Cloud

Schema

このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。


プロパティ説明
BrowsableSchemasレポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
Dataverseテーブルを検出するときにどのAnalysis dataverse をスキャンするか。
TypeDetectionSchemeprovider がCouchbase にあるバケットからテーブルとカラムをどのように作成するかを決定します。
InferNumSampleValuesデータ型を決定する前にスキャンする各フィールドの値の最大数。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
InferSampleSizeバケット内で利用可能なカラムを探すためにスキャンするドキュメント数の最大値。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
InferSimilarityMetric異なるスキーマが同じフレーバーだと見なされる類似度を指定します。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。
FlexibleSchemasWhether the provider allows queries to use columns that it has not discovered.
ExposeTTLSpecifies whether document TTL information should be exposed.
NumericStringsWhether to allow string values to be treated as numbers.
IgnoreChildAggregatesWhether the provider exposes aggregate columns that are also available as child tables. Ignored if TableSupport is not set to Full.
TableSupportprovider がCouchbase サーバー上のテーブルを検出するためにどれだけの努力をするか。
NewChildJoinsModeDetermines the kind of child table model the provider exposes.
CData Cloud

BrowsableSchemas

レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。

データ型

string

デフォルト値

""

解説

利用可能なデータベーススキーマをすべてリストすると余分な時間がかかり、パフォーマンスが低下します。 接続文字列にスキーマのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。

CData Cloud

Dataverse

テーブルを検出するときにどのAnalysis dataverse をスキャンするか。

データ型

string

デフォルト値

""

解説

このプロパティはデフォルトでは空です。つまり、すべてのdataverse がスキャンされ、DataverseSeparator に記載されているようにテーブル名が生成されます。

このプロパティを空白以外の値に割り当てると、Cloud は対応するdataverse のみをスキャンします(例えば、"Default" に設定するとDefault dataverse がスキャンされます)。1つのdataverse しかスキャンされていないため、テーブル名の先頭にdataverse 名は付きません。 以前のバージョンのCloud から使用していて、後方互換性が必要な場合は、このプロパティを"Default" に設定することをお勧めします。

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_bucket
You would set this option to "websites.exampledotcom".

CData Cloud

TypeDetectionScheme

provider がCouchbase にあるバケットからテーブルとカラムをどのように作成するかを決定します。

データ型

string

デフォルト値

"DocType"

解説

以下のオプションのカンマ区切りのリストです。

DocType 各バケットをチェックして、ドキュメント内の"docType" フィールドのさまざまな値を探すことでテーブルを検出します。例えば、バケットbeer-sample に"docType" = 'brewery' および"docType" = 'beer' のドキュメントが含まれている場合、beer-sample(すべてのドキュメントを含む)、beer-sample.brewery(醸造のみを含む)、beer-sample.brewery(ビールのみを含む)の3つのテーブルが生成されます。

RowScan と同様に、各フレーバーのドキュメントのサンプルをスキャンし、各フィールドのデータ型を決定します。RowScanDepth は、各フレーバーからスキャンされるドキュメント数を決定します。

DocType=fieldName DocType と似ていますが、"docType" ではなく"fieldName" というフィールドに基づいてスキャンします。"fieldName" は、大文字小文字の区別も含めて、Couchbase のフィールド名と完全に一致する必要があります。
Infer N1QL INFER ステートメントを使用して存在するテーブルとカラムを判断します。これはDocType よりも柔軟なフレーバー検出を行います。
RowScan バケットからドキュメントのサンプルを読み出し、ヒューリスティックにデータ型を決定します。RowScanDepth はスキャンするドキュメントの数を決定します。フレーバー検出は行いません。
None RowScan に似ていますが、検出された型ではなく文字列型を持つカラムを常に返します。

CData Cloud

InferNumSampleValues

データ型を決定する前にスキャンする各フィールドの値の最大数。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。

データ型

string

デフォルト値

"10"

解説

フィールドのデータ型を決定する前に、サンプリングされたドキュメントのすべてのフィールドからスキャンする値の最大数。 このプロパティは、Couchbase Infer コマンドを使用しているときに自動スキーマ検出 の追加設定を有効にします。このプロパティを使用するにはTypeDetectionScheme もInfer に設定する必要があります。

CData Cloud

InferSampleSize

バケット内で利用可能なカラムを探すためにスキャンするドキュメント数の最大値。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。

データ型

string

デフォルト値

"100"

解説

バケット内で利用可能なカラムを探すためにスキャンするドキュメント数の最大値。Infer コマンドは、ここで指定されたサイズのドキュメントのランダムサンプルをスキャンすることにより、カラムのメタデータを返します。

大きい値を設定すると、パフォーマンスが低下する場合があります。小さな値を設定すると、特にnull データがある場合に、カラムとデータ型が正しく決定されないことがあります。

このプロパティは、Couchbase Infer コマンドを使用しているときに自動スキーマ検出 の追加設定を有効にします。このプロパティを使用するにはTypeDetectionScheme もInfer に設定する必要があります。

CData Cloud

InferSimilarityMetric

異なるスキーマが同じフレーバーだと見なされる類似度を指定します。 TypeDetectionScheme がINFER に設定されている場合は 自動スキーマ検出 に適用されます。

データ型

string

デフォルト値

"0.7"

解説

このプロパティは、2つのスキーマが同じフレーバーとみなされるためにどの程度類似している必要があるかを指定します。例えば、次の行を考えてみましょう。

Row 1: ColA, ColB, ColC, ColD
Row 2: ColA, ColB, ColE, ColF
Row 3: ColB, ColF, ColX, ColY

次の例のように、各フレーバに返されるカラムに異なるInferSimilarityMetric 値を設定できます。

  • InferSimilarityMetric を1に設定すると、Cloud はフレーバーを返しません。
  • InferSimilarityMetric を0.5 に設定すると、Cloud は2フレーバーを返し、Row1 とRow2 で一方を構成、Row3 でもう一方を構成します。
  • InferSimilarityMetric を0.25 に設定すると、Cloud はすべての行を含む単一のフレーバーを返します。

その後、次のステートメントのように、ドット表記を使用してドキュメントフレーバーをクエリできます。

SELECT * FROM [Items.Technology]

このプロパティは、Couchbase Infer コマンドを使用しているときに自動スキーマ検出 の追加設定を有効にします。このプロパティを使用するにはTypeDetectionScheme もInfer に設定する必要があります。

CData Cloud

FlexibleSchemas

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.

CData Cloud

ExposeTTL

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:

  • All tables get a new column called Document.Expiration which contains the TTL value for each document. This column is an integer and returns whatever TTL value is stored in Couchbase directly. This column is read-write on bucket tables and read-only on child tables.
  • INSERT and UPDATE will use this field to set TTL values, or to preserve them (for update) when none is provided. Setting the field to either 0 or NULL will remove the TTL from any affected documents.

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.

CData Cloud

NumericStrings

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" }

CData Cloud

IgnoreChildAggregates

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 自動スキーマ検出. 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.

CData Cloud

TableSupport

provider がCouchbase サーバー上のテーブルを検出するためにどれだけの努力をするか。

Possible Values

Full, Basic, None

データ型

string

デフォルト値

"Full"

解説

利用可能な値は以下のとおりです。

Full Cloud は利用可能なバケットを検出し、それらの各バケットの内側を見て子テーブルを探します。これにより、ネストされたデータにアクセスする最も柔軟な方法が提供されますが、サーバー上の各バケットにプライマリインデックスがあることが必要です。
Basic Cloud は利用可能なバケットを検出しますが、その中で子テーブルを探すことはしません。これは、スキーマ検出の時間を削減したい場合、またはバケットにプライマリインデックスがない場合にお勧めします。
None Cloud はLocation ディレクトリにあるスキーマファイルのみを使用し、サーバー上のバケットを検出しません。このオプションは、スキーマファイルを作成済みの場合にのみ使用してください。スキーマファイルなしでこのオプションを使用すると、利用可能なテーブルがなくなります。

CData Cloud

NewChildJoinsMode

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:

  • Complex JOIN results may be incorrect. In most cases the Cloud can translate a JOIN like SELECT * FROM invoices INNERT JOIN invoices_lineitems ON invoices.[Document.Id] = invoices_lineitems.[Document.Id] into an UNNEST. But if the JOIN is too complex then both sides are executed separately which can produce incorrect results.
  • DML operations on nested child tables are impossible because there is no way to specify what row of the middle child to use. For example, you cannot change rows in a table like invoices_lineitems_discounts because there is no way to specify the lineitem that contains the discount you are updating.
  • Some environments like SSIS may not be able to operate on child tables at all because they do not have primary keys.

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:

  • Complex JOIN results are always consistent because they link foreign keys to primary keys. SELECT * FROM invoices INNERT JOIN invoices_lineitems ON invoices.[Document.Id] = invoices_lineitems.[Document.Parent]
  • DML operations on nested child tables are allowed because the Document.Id contains all the required information to pick out specific rows, regardless of the table's depth.
  • Environments which depend on primary keys can use these tables and generate JOIN queries since the relationships between Document.Id and Document.Parent columns are included in the Cloud metadata.

CData Cloud

Miscellaneous

このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。


プロパティ説明
ChildSeparator子テーブルを示すために使用する記号。
CreateTableRamQuotaThe default RAM quota, in megabytes, to use when inserting buckets via the CREATE TABLE syntax.
DataverseSeparatorAnalytics dataverse およびscopes/collections を示すために使用する記号。
FlattenArraysThe number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled.
FlattenObjectsフラット化されたオブジェクトプロパティとしてカラムを表示するには、 FlattenObjects をtrue に設定します。そうでなければ、配列にネストされたオブジェクトはJSON 文字列として返されます。
FlavorSeparatorフレーバーを示すために使用する記号。
InsertNullValuesDetermines whether an INSERT should include fields that have NULL values.
MaxRows集計やGROUP BY を含まないクエリで返される最大行数を指定します。
Pagesizeprovider がCouchbase にデータをリクエストするときに返す、ページあたりの最大レコード数を指定します。
PeriodsSeparator階層を示すために使用する記号。
PseudoColumnsテーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。
QueryExecutionTimeoutクエリのサーバーサイドのタイムアウトを設定します。タイムアウトエラーを返す前にCouchbase がクエリを実行する期間を決定します。
RowScanDepthテーブルで利用可能なカラムを探すためにスキャンする行数の最大値。
StrictComparisonSQL 入力クエリのフィルタをCouchbase クエリに変換する精度を調整します。 これは、値のカンマ区切りリストに設定できます。各値はdate、number、boolean、またはstring のいずれかです。
Timeoutprovider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。
TransactionDurabilitySpecifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries.
TransactionTimeoutThis sets the amount of time a transaction may execute before it is timed out by Couchbase.
UpdateNullValuesDetermines whether an UPDATE writes NULL values as NULL, or removes them.
UseCollectionsForDDLWhether 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.
UseTransactionsSpecifies whether to use N1QL transactions when executing queries.
CData Cloud

ChildSeparator

子テーブルを示すために使用する記号。

データ型

string

デフォルト値

"_"

解説

バケット下にある配列の子テーブルを作成する際、Cloud は、この区切り文字と各パスエレメントを使用して、ベーステーブルの名前をコンカテネートすることによって子テーブルの名前を生成します。

例えば、このドキュメントがバケット"customers" にある場合、addresses フィールドの子テーブルは"customers_addresses" となります。

{
  "addresses": [
    {"street": "123 Main St"},
    {"street": "424 Pleasant Ct"},
    {"street": "719 Blue Way"}
  ]
}

CData Cloud

CreateTableRamQuota

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.

CData Cloud

DataverseSeparator

Analytics dataverse およびscopes/collections を示すために使用する記号。

データ型

string

デフォルト値

"."

解説

Analytics サービスを使用すると、Cloud はすべての利用可能なdataverse からすべてのデータセットをスキャンします。潜在的な名前の衝突を避けるため、生成されるテーブル名にはdataverse 名とデータセット名が含まれます。

デフォルトでは"." に設定されているため、"Default" dataverse に"users" というデータセットがある場合、生成されるテーブルは"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".

CData Cloud

FlattenArrays

The number of elements to expose as columns from nested arrays. Ignored if IgnoreChildAggregates is enabled.

データ型

string

デフォルト値

"0"

解説

デフォルトで、ネスト配列はJSON 文字列として返されます。FlattenArrays プロパティはネスト配列のエレメントをフラット化してそれぞれのカラムとするために使われます。これは短い配列の場合にのみ推奨されます。

ネスト配列から返す要素の数にFlattenArrays を設定します。特定されたエレメントはカラムとして返されます。Zero-base のインデックスはカラム名にコンカテネートされます。他のエレメントは無視されます。

例えば、文字列の配列からエレメントのアービトラリー数を返すことができます。

["FLOW-MATIC","LISP","COBOL"]
FlattenArrays が1に設定されている場合、配列は次のテーブルのようにフラット化されます。

カラム名カラム値
languages.0FLOW-MATIC

CData Cloud

FlattenObjects

フラット化されたオブジェクトプロパティとしてカラムを表示するには、 FlattenObjects をtrue に設定します。そうでなければ、配列にネストされたオブジェクトはJSON 文字列として返されます。

データ型

bool

デフォルト値

true

解説

フラット化されたオブジェクトプロパティとしてカラムを表示するには、FlattenObjects をtrue に設定します。そうでなければ、配列にネストされたオブジェクトはJSON 文字列として返されます。プロパティ名は、カラム名を作り出すためにオブジェクト名にアンダースコアでコンカティネイトされます。

例えば、次のネストされたオブジェクトを接続時にフラット化できます。

address : {
  "street" : "123 Main St.",
  "city"   : "Nowhere",
  "state"  : "NY",
  "zip"    : "12345"
}
FlattenObjects がtrue に設定されている場合、オブジェクトは次のテーブルのようにフラット化されます:

カラム名カラム値
address.street123 Main St.
address.cityNowhere
address.stateNY
address.zip12345

CData Cloud

FlavorSeparator

フレーバーを示すために使用する記号。

データ型

string

デフォルト値

"."

解説

Cloud がDocType かInfer TypeDetectionScheme のいずれかを使用してフレーバーテーブルを検出すると、基底のバケット名、この区切り文字、およびバケットのプライマリフレーバーの値をコンカテネートしてフレーバーテーブルに名前を付けます。

例えば、Cloud が"beer-sample" バケットで"docType = 'beer'" というフレーバーを検出すると、"beer" doctype を持つ"beer-sample" 内のドキュメントのみを含む"beer-sample.beer" テーブルが生成されます。

CData Cloud

InsertNullValues

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.

CData Cloud

MaxRows

集計やGROUP BY を含まないクエリで返される最大行数を指定します。

データ型

int

デフォルト値

-1

解説

このプロパティのデフォルト値である-1 は、クエリに明示的にLIMIT 句が含まれていない限り、行の制限が適用されないことを意味します。 (クエリにLIMIT 句が含まれている場合、クエリで指定された値がMaxRows 設定よりも優先されます。)

MaxRows を0より大きい整数に設定することで、クエリがデフォルトで過度に大きな結果セットを返さないようにします。

このプロパティは、非常に大きなデータセットを返す可能性のあるクエリを実行する際に、パフォーマンスを最適化し、過剰なリソース消費を防ぐのに役立ちます。

CData Cloud

Pagesize

provider がCouchbase にデータをリクエストするときに返す、ページあたりの最大レコード数を指定します。

データ型

int

デフォルト値

1000

解説

クエリを処理する際、Couchbase でクエリされたデータすべてを一度にリクエストする代わりに、Cloud はクエリされたデータをページと呼ばれる部分ごとにリクエストすることができます。

この接続プロパティは、Cloud がページごとにリクエストする結果の最大数を決定します。

Note:大きなページサイズを設定すると全体的なクエリ実行時間が短縮される可能性がありますが、その場合、クエリ実行時にCloud がより多くのメモリを使用することになり、タイムアウトが発生するリスクがあります。

CData Cloud

PeriodsSeparator

階層を示すために使用する記号。

データ型

string

デフォルト値

"."

解説

オブジェクトと配列をフラット化するとき、Cloud はこの値を使って異なるレベルのオブジェクトと配列を分離します。例えば、Couchbase サーバーがこのようなドキュメントを返す(そしてFlattenObjects が有効になっている)とき、ピリオド区切り文字が"." に設定されている場合は、Cloud は"geo.latitude" と"geo.longitude" というカラムを返します。

{
  "geo": {
    "latitude": 35.9132,
    "longitude": -79.0558
  }
}

CData Cloud

PseudoColumns

テーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。

データ型

string

デフォルト値

""

解説

このプロパティを使用すると、Cloud がテーブルカラムとして公開する擬似カラムを定義できます。

個々の擬似カラムを指定するには、以下の形式を使用します。

Table1=Column1;Table1=Column2;Table2=Column3

すべてのテーブルのすべての擬似カラムを含めるには、次を使用してください:

*=*

CData Cloud

QueryExecutionTimeout

クエリのサーバーサイドのタイムアウトを設定します。タイムアウトエラーを返す前にCouchbase がクエリを実行する期間を決定します。

データ型

string

デフォルト値

"-1"

解説

デフォルトは-1で、タイムアウトは無効になっています。タイムアウトを有効にする場合、値には量と単位の両方を含める必要があります。単位は "ns" (nanoseconds)、"us" (microseconds)、"ms" (milliseconds)、"s" (seconds)、"m" (minutes)、または"h" (hours) のいずれかです。例えば、"5m" と"300s" はどちらもタイムアウトを5分に設定します。

"index scan timeout" というサーバー側のタイムアウトもあります。そちらがより小さい場合はこれを上書きします。デフォルトではインデックススキャンタイムアウトは2分ですが、Couchbase サーバーの"indexer.settings.scan_timeout" プロパティを設定することで変更できます。

CData Cloud

RowScanDepth

テーブルで利用可能なカラムを探すためにスキャンする行数の最大値。

データ型

int

デフォルト値

100

解説

テーブルのカラムはテーブル行をスキャンすることで決定される必要があります。この値はスキャンされる行数の最大値を設定します。

大きい値を設定すると、パフォーマンスが低下する場合があります。小さい値を設定すると、特にnull データがある場合には、データ型を正しく判定できない場合があります。

CData Cloud

StrictComparison

SQL 入力クエリのフィルタをCouchbase クエリに変換する精度を調整します。 これは、値のカンマ区切りリストに設定できます。各値はdate、number、boolean、またはstring のいずれかです。

データ型

string

デフォルト値

""

解説

このオプションはデフォルトでは空です。つまり、 Couchbase に送られたWHERE 句は値を変換する追加の関数を含むのでより多くの比較が機能します。

例えば、"string" 設定をリストから除外すると、配列は変換され、文字列と比較えきるようになります。

SELECT * FROM Bucket WHERE MyArrayColumn = '[1,2,3]'

値を設定すると、関連するタイプの比較を含むクエリは文字どおりに変換されます。 これはCouchbase のインデックスをより有効に利用しますが、比較のタイプが Couchbase が直接比較できるフォーマットでなければならないことを意味します。

例えば、"date" がオプションの1つとして提供されている場合、日付は自動的には変換されないため、 Couchbase の場合と同じ形で格納されている必要があります。

SELECT * FROM Bucket WHERE MyDateColumn = '2018-10-31T10:00:00';

CData Cloud

Timeout

provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。

データ型

int

デフォルト値

60

解説

タイムアウトは、クエリや操作全体ではなくサーバーとの個々の通信に適用されます。 例えば、各ページング呼び出しがタイムアウト制限内に完了する場合、クエリは60秒を超えて実行を続けることができます。

タイムアウトはデフォルトで60秒に設定されています。タイムアウトを無効にするには、このプロパティを0に設定します。

タイムアウトを無効にすると、操作が成功するか、サーバー側のタイムアウト、ネットワークの中断、またはサーバーのリソース制限などの他の条件で失敗するまで無期限に実行されます。

Note: このプロパティは慎重に使用してください。長時間実行される操作がパフォーマンスを低下させたり、応答しなくなる可能性があるためです。

CData Cloud

TransactionDurability

Specifies how a document must be stored for a transaction to succeed. Specifies whether to use N1QL transactions when executing queries.

Possible Values

None, Majority, MajorityAndPersistActive, PersistToMajority

データ型

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.

CData Cloud

TransactionTimeout

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.

CData Cloud

UpdateNullValues

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.

CData Cloud

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.

データ型

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
)

CData Cloud

UseTransactions

Specifies whether to use N1QL transactions when executing queries.

Possible Values

Never, Always, Explicit

データ型

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.

CData Cloud

Third Party Copyrights

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.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9435