CData Sync App は、Apache CouchDB データをデータベース、データレイク、またはデータウェアハウスに継続的にパイプライン化する簡単な方法を提供し、分析、レポート、AI、および機械学習で簡単に利用できるようにします。
Apache CouchDB コネクタはCData Sync アプリケーションから使用可能で、Apache CouchDB からデータを取得して、サポートされている任意の同期先に移動できます。
Sync App はCouchDB version 1.6 以降をサポートします。SQL-to-ApacheCouchDB-query のマッピング、およびSQL を介したApache CouchDB の非構造化データへのアクセスについて詳しくは、クエリマッピング を参照してください。
必須プロパティについては、設定タブを参照してください。
通常必須ではない接続プロパティについては、高度な設定タブを参照してください。
Url 接続プロパティをApache CouchDB インスタンスのURL に設定します。例:http://localhost:5984
ユーザー(またはJWT)が特定のデータベースだけにアクセスできるようにしたい場合は、Apache CouchDB インスタンスでadmin_only_all_dbs オプションを設定し、テーブルをリストするためにSync App が必要とする"/_all_dbs" エンドポイントへのアクセス権をすべてのユーザーに付与する必要があります。
データに接続するには以下を設定します。
Set AuthScheme to JWT.
You can either automatically generate (and, if applicable, refresh) a JWT or manually generate one:
Required
Optional
You can generate the tokens yourself manually and pass them to the Sync App by using the JWTToken connection property.
When using asymmetric algorithms to sign the tokens, you must generate a private/public key pair. For that, a cryptographic library like OpenSSL can be used. For example:
# generate private key openssl genrsa --out private_rsa256.pem 2048 # extract public key openssl rsa -in private_rsa256.pem -pubout > public_rsa256.pem
Refer to CouchDB JWT Authentication Documentation for the following.
The alg and sub are required claims and will always be validated by the Apache CouchDB instance. Other required claims can be configured in the server (see required_claims). In that case, you must use JWTHeaders and JWTClaims so that the Sync App can include those additional claims when generating the JWT.
You can use roles_claim_name or the roles_claim_path options to assign roles to the JWTs.
An example configuration of the server and corresponding sample connection string are shown below:
[chttpd]
...
authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
admin_only_all_dbs = false
...
[jwt_auth]
...
required_claims = exp
roles_claim_path = my.nested._couchdb\.roles
rsa:rsa_256 = -----BEGIN PUBLIC KEY-----\nYOUR_PUBLIC_KEY\n-----END PUBLIC KEY-----\n
...
Url=http://localhost:5984; JWTSubject=JWT User 1; JWTAlgorithm=RS256; JWTKeyType=PEMKEY_FILE; JWTKey=PATH_TO_FOLDER\private_rsa256.pem; JWTHeaders=kid : rsa_256 | Custom Header 1 : Test 1; JWTClaims= my : eyJuZXN0ZWQiOnsiX2NvdWNoZGIucm9sZXMiOlsidXNlcjIiXX19 | Custom Claim 1 : Test 1;
データに接続するには以下を設定します。
次のプロパティを使って、自動データ型検出を設定できます。デフォルトは有効です。
Apache CouchDB is a schema-less document database that provides high performance, availability, and scalability. These features are not necessarily incompatible with a standards-compliant query language like SQL-92. The following sections show various schemes that the Sync App offers to bridge the gap with relational SQL and a document database.
The Sync App models the schemaless Apache CouchDB objects into relational tables and translates SQL queries into Apache CouchDB queries to get the requested data.
The schema of the table is necessary to report metadata, but you can write フリーフォームクエリ not tied to the schema to select, insert, update, or delete data from columns that do not exist in the schema (without flattening).
See 垂直フラット化 to process JSON arrays as separate tables.
See クエリマッピング for more details on how various Apache CouchDB operations are represented as SQL.
Sync App は、コレクション内のApache CouchDB ドキュメントをサンプルとして調べ、リレーショナルスキーマを提案します。RowScanDepth プロパティを使って、Sync App がスキャンするドキュメント数を設定することができます。検出プロセスで特定されるカラムはFlattenArrays およびFlattenObjects プロパティに依存します。
FlattenObjects が設定されている場合、すべてのネストされたオブジェクトは連続したカラムにフラット化されます。例えば、次のドキュメントを考えましょう。
{
id: 12,
name: "Lohia Manufacturers Inc.",
address: {street: "Main Street", city: "Chapel Hill", state: "NC"},
offices: ["Chapel Hill", "London", "New York"],
annual_revenue: 35,600,000
}
このドキュメントは次のカラムにより表されます:
| カラム名 | データ型 | サンプル値 |
| id | Integer | 12 |
| name | String | Lohia Manufacturers Inc. |
| address.street | String | Main Street |
| address.city | String | Chapel Hill |
| address.state | String | NC |
| offices | String | ["Chapel Hill", "London", "New York"] |
| annual_revenue | Double | 35,600,000 |
FlattenObjects が設定されていない場合、address.street、address.city、およびaddress.state カラムは別々にはなりません。文字列型の住所カラムは一つのオブジェクトとして表されます。値は次のようになります {street:"Main Street", city:"Chapel Hill", state:"NC"}。JSON アグリゲートの詳細についてはJSON 関数 を参照してください。
カラム名の区切り文字をドットから変更するには、SeparatorCharacter を設定します。
FlattenArrays プロパティは配列の値をフラット化してそれぞれのカラムとするために使われます。これは次の例のように短い配列の場合にのみ推奨されます。
"coord": [ -73.856077, 40.848447 ]FlattenArrays プロパティは2に設定して上の配列を次のように表すことができます:
| カラム名 | データ型 | サンプル値 |
| coord.0 | Float | -73.856077 |
| coord.1 | Float | 40.848447 |
アンバウンドの配列をそのままにしておき、必要な際にJSON 関数 を使ってデータを取り出すことをお勧めします。
自動スキーマ検出 の説明にあるとおり、直感的なテーブルスキーマは非構造化Apache CouchDB データへのSQL アクセスを可能にします。JSON 関数 は標準のJSON 関数を使ってApache CouchDB データをサマライズし、あらゆるネスト構造から値を抽出できます。 しかし、これらのスキーマに限定されません。
接続後は、どんなネストされた構造でもデータをフラット化せずにクエリできますFlattenArrays やFlattenObjects でアクセスできるあらゆるリレーションへは、アドホックなSQL クエリを使ってもアクセスが可能です。
次のRestaurant データセットからのサンプルドキュメントを考えてみましょう。
{
"address": {
"building": "1007",
"coord": [
-73.856077,
40.848447
],
"street": "Morris Park Ave",
"zipcode": "10462"
},
"borough": "Bronx",
"cuisine": "Bakery",
"grades": [
{
"grade": "A",
"score": 2,
"date": {
"$date": "1393804800000"
}
},
{
"date": {
"$date": "1378857600000"
},
"grade": "B",
"score": 6
},
{
"score": 10,
"date": {
"$date": "1358985600000"
},
"grade": "C"
}
],
"name": "Morris Park Bake Shop",
"restaurant_id": "30075445"
}
このドキュメントのあらゆるネスト構造にカラムとしてアクセスできます。以下のクエリで示すように、ドット表記法を使ってアクセスしたい値にドリルダウンします。配列のインデックスはゼロオリジンです。例えば、次のクエリではサンプル内のrestaurant のsecond grade を取得します。
SELECT [address.building], [grades.1.grade] FROM restaurants WHERE restaurant_id = '30075445'先のクエリは、次の結果を返します。
| カラム名 | データ型 | サンプル値 |
| address.building | String | 1007 |
| grades.1.grade | String | A |
ドキュメントの配列を、個別のテーブルのように取得することが可能です。例えば、restaurants コレクションから次のJSON 構造を取得します。
{
"_id" : ObjectId("568c37b748ddf53c5ed98932"),
"address" : {
"building" : "1007",
"coord" : [-73.856077, 40.848447],
"street" : "Morris Park Ave",
"zipcode" : "10462"
},
"borough" : "Bronx",
"cuisine" : "Bakery",
"grades" : [{
"date" : ISODate("2014-03-03T00:00:00Z"),
"grade" : "A",
"score" : 2
}, {
"date" : ISODate("2013-09-11T00:00:00Z"),
"grade" : "A",
"score" : 6
}, {
"date" : ISODate("2013-01-24T00:00:00Z"),
"grade" : "A",
"score" : 10
}, {
"date" : ISODate("2011-11-23T00:00:00Z"),
"grade" : "A",
"score" : 9
}, {
"date" : ISODate("2011-03-10T00:00:00Z"),
"grade" : "B",
"score" : 14
}],
"name" : "Morris Park Bake Shop",
"restaurant_id" : "30075445"
}
垂直フラット化ではgrades 配列を別々のテーブルとして取得することを許可します。
SELECT * FROM [restaurants.grades]このクエリは、次のデータセットを返します。
| date | grade | score | P_id | _index |
| 2014-03-03T00:00:00.000Z | A | 2 | 568c37b748ddf53c5ed98932 | 1 |
| 2013-09-11T00:00:00.000Z | A | 6 | 568c37b748ddf53c5ed98932 | 2 |
| 2013-01-24T00:00:00.000Z | A | 10 | 568c37b748ddf53c5ed98932 | 3 |
SELECT [restaurants].[restaurant_id], [restaurants.grades].* FROM [restaurants.grades] JOIN [restaurants] WHERE [restaurants].name = 'Morris Park Bake Shop'このクエリは、次のデータセットを返します。
| restaurant_id | date | grade | score | P_id | _index |
| 30075445 | 2014-03-03T00:00:00.000Z | A | 2 | 568c37b748ddf53c5ed98932 | 1 |
| 30075445 | 2013-09-11T00:00:00.000Z | A | 6 | 568c37b748ddf53c5ed98932 | 2 |
| 30075445 | 2013-01-24T00:00:00.000Z | A | 10 | 568c37b748ddf53c5ed98932 | 3 |
| 30075445 | 2011-11-23T00:00:00.000Z | A | 9 | 568c37b748ddf53c5ed98932 | 4 |
| 30075445 | 2011-03-10T00:00:00.000Z | B | 14 | 568c37b748ddf53c5ed98932 | 5 |
Sync App では、JSON ストラクチャーをカラム値として返すことができます。Sync App を使って、これらのJSON ストラクチャーにおいて標準SQL 関数を使用できます。このセクションの例では、次の配列を使用します。
[
{ "grade": "A", "score": 2 },
{ "grade": "A", "score": 6 },
{ "grade": "A", "score": 10 },
{ "grade": "A", "score": 9 },
{ "grade": "B", "score": 14 }
]
SELECT Name, JSON_EXTRACT(grades,'[0].grade') AS Grade, JSON_EXTRACT(grades,'[0].score') AS Score FROM Students;
| カラム名 | サンプル値 |
| Grade | A |
| Score | 2 |
SELECT Name, JSON_COUNT(grades,'[x]') AS NumberOfGrades FROM Students;
| カラム名 | サンプル値 |
| NumberOfGrades | 5 |
SELECT Name, JSON_SUM(score,'[x].score') AS TotalScore FROM Students;
| カラム名 | サンプル値 |
| TotalScore | 41 |
SELECT Name, JSON_MIN(score,'[x].score') AS LowestScore FROM Students;
| カラム名 | サンプル値 |
| LowestScore | 2 |
SELECT Name, JSON_MAX(score,'[x].score') AS HighestScore FROM Students;
| カラム名 | サンプル値 |
| HighestScore | 14 |
DOCUMENT 関数はすべてのドキュメントをJSON 文字列として取得する場合に用いられます。例として、次のクエリとその結果をご覧ください。
SELECT DOCUMENT(*) FROM Customers;上のクエリはすべてのドキュメントを返します。
{ "id": 12, "name": "Lohia Manufacturers Inc.", "address": { "street": "Main Street", "city": "Chapel Hill", "state": "NC"}, "offices": [ "Chapel Hill", "London", "New York" ], "annual_revenue": 35,600,000 }
The Sync App maps SQL queries into the corresponding Apache CouchDB queries. The Sync App uses the Selector syntax to compute the desired results.
A detailed description of all the transformations is out of scope, but we will describe some of the common elements that are used.
The SELECT statement is mapped to the GET and POST methods. Below are example queries and the corresponding request payloads.
| SQL Query | Apache CouchDB Query |
SELECT * FROM sales |
For this query a GET request is sent to the /_all_docs endpoint. |
SELECT _id, value FROM sales | {
"fields": [
"_id",
"value"
],
"skip": 0,
"selector": {
"_id": {
"$exists": true
}
}
} |
SELECT * FROM sales WHERE value=175033291697 | {
"selector": {
"value": {
"$eq": 175033291697
}
},
"skip": 0
} |
SELECT * FROM sales WHERE value = 175033291697 OR month='June' | {
"selector": {
"$or": [
{
"value": {
"$eq": 175033291697
}
},
{
"month": {
"$eq": "June"
}
}
]
},
"skip": 0
} |
SELECT * FROM sales WHERE name LIKE 'A%' | {
"selector": {
"name": {
"$regex": "A%"
}
},
"skip": 0
} |
SELECT * FROM sales WHERE month='June' ORDER BY _id ASC | {
"skip": 0,
"sort": [
{
"_id": "asc"
}
],
"selector": {
"month": {
"$eq": "June"
}
}
} |
SELECT * FROM sales WHERE month='June' ORDER BY _id DESC | {
"skip": 0,
"sort": [
{
"_id": "desc"
}
],
"selector": {
"month": {
"$eq": "June"
}
}
} |
The INSERT statement is mapped to the HTTP POST request, as shown in the following query and request payload.
SQL Query
INSERT INTO users (_id, age, status, [address.city], [address.postalcode])
VALUES ('bcd001', 45, 'A', 'Chapel Hill', 27517)
Apache CouchDB Query
{
"address": {
"city": "Chapel Hill",
"postalcode": 27517
},
"_id": "bcd001",
"age": 45,
"status": "A"
}
The UPDATE statement is mapped to the HTTP PUT method, as shown in the following query and request payload.
SQL Query
UPDATE users SET status = 'C', [address.postalcode] = 90210 WHERE _id = 'bcd001'
Apache CouchDB Query
{
"_id": "bcd001",
"_rev": "1-446f6c67e3a483feae8eaf112f18892c",
"status": "C",
"age": 45,
"address": {
"city": "Chapel Hill",
"postalcode": 90210
}
}
The DELETE statement is mapped to the DELETE method as shown below.
SQL Query
DELETE FROM users WHERE _id = 'bcd001'
Apache CouchDB Query
For this query, a DELETE request is sent to the users/{_id}?rev={_rev} endpoint.
The Sync App maps types from Apache CouchDB to the Sync App's own data types. The table below documents these mappings.
The data type that some columns are regarded as by the Sync App is dynamically assessed based on the values in the column. Possible type determinations are shown as comma-separated values below.
The number of rows checked when determining the data type of a column is controlled by the RowScanDepth connection property.
| Apache CouchDB | CData Data Type |
| string | VARCHAR, INTEGER, BIGINT, DOUBLE, BOOLEAN, DATE, TIME, TIMESTAMP |
| number | INTEGER, BIGINT, DOUBLE |
| boolean | BOOLEAN |
| object | VARCHAR (FlattenObjects=false) |
| array | VARCHAR (FlattenArrays=0) |
| null | VARCHAR |
| プロパティ | 説明 |
| AuthScheme | The type of authentication to use when connecting to Apache CouchDB. |
| URL | The URL used to connect to the Apache CouchDB. |
| User | 認証するApache CouchDB ユーザーアカウントのユーザーID を指定します。 |
| Password | 認証するユーザーアカウントのパスワードを指定します。 |
| PublicDatabases | Specify a comma-separated list of public databases to list as tables. |
| プロパティ | 説明 |
| JWTToken | The JWT to use for authentication. |
| JWTSubject | The user subject for which the application is requesting delegated access. |
| JWTIssuer | The issuer of the JWT. |
| JWTAlgorithm | The encryption algorithm used for signing the JWT. |
| JWTExpiration | The amount of time until the JWT expires, in seconds. |
| JWTKeyType | The type of the encryption key used for signing the JWT. |
| JWTKey | The encryption key for signing the JWT. |
| JWTHeaders | A collection of extra HTTP headers to include in the JWT header. |
| JWTClaims | A collection of extra claims to include in the JWT payload. |
| CredentialsLocation | The filepath of the settings file containing the JWT. If a settings file does not exist in this location, the provider creates a new settings file when it retrieves a JWT. |
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
| プロパティ | 説明 |
| FirewallType | provider がプロキシベースのファイアウォールを介してトラフィックをトンネリングするために使用するプロトコルを指定します。 |
| FirewallServer | ファイアウォールを通過し、ユーザーのクエリをネットワークリソースに中継するために使用されるプロキシのIP アドレス、DNS 名、またはホスト名を識別します。 |
| FirewallPort | プロキシベースのファイアウォールで使用するTCP ポートを指定します。 |
| FirewallUser | プロキシベースのファイアウォールに認証するアカウントのユーザーID を識別します。 |
| FirewallPassword | プロキシベースのファイアウォールで認証するユーザーアカウントのパスワードを指定します。 |
| プロパティ | 説明 |
| ProxyAutoDetect | provider が、手動で指定されたプロキシサーバーを使用するのではなく、既存のプロキシサーバー構成についてシステムプロキシ設定をチェックするかどうかを指定します。 |
| ProxyServer | HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。 |
| ProxyPort | クライアントとの間でHTTP トラフィックをルーティングするために予約された、指定されたプロキシサーバー(ProxyServer 接続プロパティで設定)のTCP ポート。 |
| ProxyAuthScheme | ProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法を指定します。 |
| ProxyUser | ProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。 |
| ProxyPassword | ProxyUser 接続プロパティで指定されたユーザーに紐付けられたパスワード。 |
| ProxySSLType | ProxyServer 接続プロパティで指定されたプロキシサーバーに接続する際に使用するSSL タイプ。 |
| ProxyExceptions | ProxyServer 接続プロパティで設定されたプロキシサーバー経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。 |
| プロパティ | 説明 |
| LogModules | ログファイルに含めるコアモジュールを指定します。セミコロンで区切られたモジュール名のリストを使用します。デフォルトでは、すべてのモジュールがログに記録されます。 |
| プロパティ | 説明 |
| Location | テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリの場所を指定します。サービスの要件に応じて、これは絶対パスまたは相対パスのいずれかで表されます。 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| Tables | レポートされるテーブルを利用可能なすべてのテーブルのサブセットに制限するオプション設定。例えば、 Tables=TableA,TableB,TableC です。 |
| Views | レポートされたビューを使用可能なテーブルのサブセットに制限するオプション設定。例えば、 Views=ViewA,ViewB,ViewC です。 |
| ListViews | Whether to list views from Apache CouchDB or not. |
| プロパティ | 説明 |
| FlattenArrays | Set FlattenArrays to the number of array elements to flatten into columns. Otherwise, arrays are returned as JSON strings. |
| FlattenObjects | Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, embedded objects as raw JSON strings. |
| FlexibleSchema | Set FlexibleSchema to true to scan for additional metadata on the query result set. Otherwise, the metadata will remain the same. |
| MaxRows | 集計やGROUP BY を使用しないクエリで返される最大行数を指定します。 |
| Other | 特定のユースケースに対して追加の隠しプロパティを指定します。これらは通常のprovider の機能では必要ありません。複数のプロパティを定義するには、セミコロンで区切られたリストを使用します。 |
| Pagesize | Apache CouchDB から返される、1ページあたりの結果の最大数を指定します。この設定は、ほとんどのユースケースに最適化されている、データソースによって設定されたデフォルトのページサイズをオーバーライドします。 |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。 |
| RowScanDepth | テーブルで利用可能なカラムを探すためにスキャンする行数の最大値。 |
| SeparatorCharacter | The character or characters used to denote hierarchy. |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。 |
| TypeDetectionScheme | Determines how the provider will scan the data to determine the fields and data types in each document collection. |
| UserDefinedViews | カスタムビューを定義するJSON 構成ファイルへのファイルパスを指定します。provider は、このファイルで指定されたビューを自動的に検出して使用します。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。
| プロパティ | 説明 |
| AuthScheme | The type of authentication to use when connecting to Apache CouchDB. |
| URL | The URL used to connect to the Apache CouchDB. |
| User | 認証するApache CouchDB ユーザーアカウントのユーザーID を指定します。 |
| Password | 認証するユーザーアカウントのパスワードを指定します。 |
| PublicDatabases | Specify a comma-separated list of public databases to list as tables. |
The type of authentication to use when connecting to Apache CouchDB.
The URL used to connect to the Apache CouchDB.
The URL used to connect to the Apache CouchDB in the format http://{server}:{port}.
Specify a comma-separated list of public databases to list as tables.
This is needed for anonymous access (AuthScheme=None) because the database listing call requires user authentication.
このセクションでは、本プロバイダーの接続文字列で設定可能なJWT Authentication プロパティの全リストを提供します。
| プロパティ | 説明 |
| JWTToken | The JWT to use for authentication. |
| JWTSubject | The user subject for which the application is requesting delegated access. |
| JWTIssuer | The issuer of the JWT. |
| JWTAlgorithm | The encryption algorithm used for signing the JWT. |
| JWTExpiration | The amount of time until the JWT expires, in seconds. |
| JWTKeyType | The type of the encryption key used for signing the JWT. |
| JWTKey | The encryption key for signing the JWT. |
| JWTHeaders | A collection of extra HTTP headers to include in the JWT header. |
| JWTClaims | A collection of extra claims to include in the JWT payload. |
| CredentialsLocation | The filepath of the settings file containing the JWT. If a settings file does not exist in this location, the provider creates a new settings file when it retrieves a JWT. |
The JWT to use for authentication.
If you have manually generated a JWT, you can provide it in this connection property. If a value is not supplied in this connection property, the Sync App generates the token itself.
The user subject for which the application is requesting delegated access.
This is used as the sub claim in the JWT.
Apache CouchDB uses this as the user’s name when validating the JWT.
The issuer of the JWT.
If not specified, this connection property defaults to the name of the Sync App, including version information.
The encryption algorithm used for signing the JWT.
This is used as the alg claim in the JWT. This property can take one of the following values:
| RS256, RS384, RS512 | RSA signature with SHA hashing (SHA-256, SHA-384, SHA-512) |
| ES256, ES384, ES512 | ECDSA signature with NIST curves (P-256, P-384, P-512) and SHA hashing (SHA-256, SHA-384, SHA-512) |
| HS256, HS384, HS512 | HMAC signature with SHA hashing (SHA-256, SHA-384, SHA-512) |
The amount of time until the JWT expires, in seconds.
This is used to calculate the exp claim in the JWT.
When set to -1, the Sync App generates the first token, but never refreshes it. This is the default value.
The type of the encryption key used for signing the JWT.
This property can take one of the following values:
| PEMKEY_FILE | An absolute path to a PEM-encoded file that contains the private key. |
| PEMKEY_BLOB | The private key (base64-encoded). |
| SYMMETRIC | The symmetric key (base64-encoded). Use this in cases when you are signing the JWT with a symmetric algorithm (e.g. HS256, HS384, HS512, etc.).
The key itself can be any length. If needed, the Sync App pads or hashes the key to match the requirements of the chosen JWTAlgorithm. For best security, the key should be at least as long as the hash output (for example, 32 bytes for SHA-256). |
The encryption key for signing the JWT.
The encryption key used for signing the JWT generated by the Sync App. The JWTKeyType field specifies the type of the key being used.
A collection of extra HTTP headers to include in the JWT header.
The string should not contain any single quotes or double quotes.
The : character is a delimiter separating headers and their values, and the | character is a delimiter separating the header name-value pairs. End the list of headers with a semicolon. For example:
JWTHeaders = kid : key_1 | Custom Header 1 : value;
If you need to use more complex values such as JSON objects or arrays, they must be base64 encoded. For example:
JWTHeaders = kid : key_1 | my : eyJjdXN0b20iOlsianNvbiIsIm9iamVjdCJdfQ==;
By default, not all headers in the JWT are validated by Apache CouchDB (only alg). See the documentation of required_claims for information about enforcing the validation of additional headers.
A collection of extra claims to include in the JWT payload.
The string should not contain any single quotes or double quotes.
The : character is a delimiter separating claims and their values, and the | character is a delimiter separating the name-value pairs of each claim. End the list of claims with a semicolon. For example:
JWTClaims = aud : https://my.couchdb.server | nbf : 1720444762;
If you need to use more complex values such as JSON objects or arrays, they have to be base64 encoded. For example:
JWTClaims = my : eyJuZXN0ZWQiOnsiX2NvdWNoZGIucm9sZXMiOlsidXNlcjIiXX19 | nbf : 1720444762;
By default, not all claims in the JWT are validated by Apache CouchDB (only alg). See the documentation of required_claims for information about enforcing the validation of additional claims.
The filepath of the settings file containing the JWT. If a settings file does not exist in this location, the provider creates a new settings file when it retrieves a JWT.
If left unspecified, the default location is "<OS-dependent path prefix>\\CData\\ApacheCouchDB Data Provider\\CredentialsFile.txt", where <OS-dependent path prefix> is a different value depending on the operating system from which you are running the Sync App:
| Platform | OS-Dependent Path Prefix |
| Windows | The value of the APPDATA environment variable |
| Linux | ~/.config |
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。
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 |
これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。
すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。
このセクションでは、本プロバイダーの接続文字列で設定可能なFirewall プロパティの全リストを提供します。
| プロパティ | 説明 |
| FirewallType | provider がプロキシベースのファイアウォールを介してトラフィックをトンネリングするために使用するプロトコルを指定します。 |
| FirewallServer | ファイアウォールを通過し、ユーザーのクエリをネットワークリソースに中継するために使用されるプロキシのIP アドレス、DNS 名、またはホスト名を識別します。 |
| FirewallPort | プロキシベースのファイアウォールで使用するTCP ポートを指定します。 |
| FirewallUser | プロキシベースのファイアウォールに認証するアカウントのユーザーID を識別します。 |
| FirewallPassword | プロキシベースのファイアウォールで認証するユーザーアカウントのパスワードを指定します。 |
provider がプロキシベースのファイアウォールを介してトラフィックをトンネリングするために使用するプロトコルを指定します。
プロキシベースのファイアウォール(またはプロキシファイアウォール)は、ユーザーのリクエストとそれがアクセスするリソースの間に介在するネットワークセキュリティデバイスです。 プロキシは認証済みのユーザーのリクエストを受け取り、ファイアウォールを通過して適切なサーバーにリクエストを送信します。
プロキシは、リクエストを送信したユーザーに代わってデータバケットを評価し転送するため、ユーザーはサーバーに直接接続することなく、プロキシのみに接続します。
Note:デフォルトでは、Sync App はシステムプロキシに接続します。この動作を無効化し、次のプロキシタイプのいずれかに接続するには、ProxyAutoDetect をfalse に設定します。
次の表は、サポートされている各プロトコルのポート番号情報です。
| プロトコル | デフォルトポート | 説明 |
| TUNNEL | 80 | Sync App がApache CouchDB への接続を開くポート。トラフィックはこの場所のプロキシを経由して行き来します。 |
| SOCKS4 | 1080 | Sync App がApache CouchDB への接続を開くポート。SOCKS 4 は次にFirewallUser 値をプロキシに渡し、接続リクエストが許容されるかどうかを決定します。 |
| SOCKS5 | 1080 | Sync App がApache CouchDB にデータを送信するポート。SOCKS 5 プロキシに認証が必要な場合には、FirewallUser およびFirewallPassword をプロキシが認識する認証情報に設定します。 |
HTTP プロキシへの接続には、ProxyServer およびProxyPort ポートを使ってください。HTTP プロキシへの認証には、ProxyAuthScheme、ProxyUser、およびProxyPassword を使ってください。
ファイアウォールを通過し、ユーザーのクエリをネットワークリソースに中継するために使用されるプロキシのIP アドレス、DNS 名、またはホスト名を識別します。
プロキシベースのファイアウォール(またはプロキシファイアウォール)は、ユーザーのリクエストとそれがアクセスするリソースの間に介在するネットワークセキュリティデバイスです。 プロキシは認証済みのユーザーのリクエストを受け取り、ファイアウォールを通過して適切なサーバーにリクエストを送信します。
プロキシは、リクエストを送信したユーザーに代わってデータバケットを評価し転送するため、ユーザーはサーバーに直接接続することなく、プロキシのみに接続します。
プロキシベースのファイアウォールで使用するTCP ポートを指定します。
プロキシベースのファイアウォール(またはプロキシファイアウォール)は、ユーザーのリクエストとそれがアクセスするリソースの間に介在するネットワークセキュリティデバイスです。 プロキシは認証済みのユーザーのリクエストを受け取り、ファイアウォールを通過して適切なサーバーにリクエストを送信します。
プロキシは、リクエストを送信したユーザーに代わってデータバケットを評価し転送するため、ユーザーはサーバーに直接接続することなく、プロキシのみに接続します。
プロキシベースのファイアウォールに認証するアカウントのユーザーID を識別します。
プロキシベースのファイアウォール(またはプロキシファイアウォール)は、ユーザーのリクエストとそれがアクセスするリソースの間に介在するネットワークセキュリティデバイスです。 プロキシは認証済みのユーザーのリクエストを受け取り、ファイアウォールを通過して適切なサーバーにリクエストを送信します。
プロキシは、リクエストを送信したユーザーに代わってデータバケットを評価し転送するため、ユーザーはサーバーに直接接続することなく、プロキシのみに接続します。
プロキシベースのファイアウォールで認証するユーザーアカウントのパスワードを指定します。
プロキシベースのファイアウォール(またはプロキシファイアウォール)は、ユーザーのリクエストとそれがアクセスするリソースの間に介在するネットワークセキュリティデバイスです。 プロキシは認証済みのユーザーのリクエストを受け取り、ファイアウォールを通過して適切なサーバーにリクエストを送信します。
プロキシは、リクエストを送信したユーザーに代わってデータバケットを評価し転送するため、ユーザーはサーバーに直接接続することなく、プロキシのみに接続します。
このセクションでは、本プロバイダーの接続文字列で設定可能なProxy プロパティの全リストを提供します。
| プロパティ | 説明 |
| ProxyAutoDetect | provider が、手動で指定されたプロキシサーバーを使用するのではなく、既存のプロキシサーバー構成についてシステムプロキシ設定をチェックするかどうかを指定します。 |
| ProxyServer | HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。 |
| ProxyPort | クライアントとの間でHTTP トラフィックをルーティングするために予約された、指定されたプロキシサーバー(ProxyServer 接続プロパティで設定)のTCP ポート。 |
| ProxyAuthScheme | ProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法を指定します。 |
| ProxyUser | ProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。 |
| ProxyPassword | ProxyUser 接続プロパティで指定されたユーザーに紐付けられたパスワード。 |
| ProxySSLType | ProxyServer 接続プロパティで指定されたプロキシサーバーに接続する際に使用するSSL タイプ。 |
| ProxyExceptions | ProxyServer 接続プロパティで設定されたプロキシサーバー経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。 |
provider が、手動で指定されたプロキシサーバーを使用するのではなく、既存のプロキシサーバー構成についてシステムプロキシ設定をチェックするかどうかを指定します。
この接続プロパティをTrue に設定すると、Sync App は既存のプロキシサーバー構成についてシステムプロキシ設定をチェックします(プロキシサーバーの詳細を手動で入力する必要はありません)。
この接続プロパティは他のプロキシ設定より優先されます。特定のプロキシサーバーに接続するためにSync App を手動で構成する場合は、False に設定します。
HTTP プロキシへの接続には、ProxyServer を参照してください。SOCKS やトンネリングなどの他のプロキシには、FirewallType を参照してください。
HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。
ProxyAutoDetect がFalse に設定されている場合、Sync App はこの接続プロパティで指定されたプロキシサーバーを通じてのみHTTP トラフィックをルーティングします。ProxyAutoDetect がTrue に設定されている場合(デフォルト)、Sync App は代わりにシステムプロキシ設定で指定されたプロキシサーバーを介してHTTP トラフィックをルーティングします。
クライアントとの間でHTTP トラフィックをルーティングするために予約された、指定されたプロキシサーバー(ProxyServer 接続プロパティで設定)のTCP ポート。
ProxyAutoDetect がFalse に設定されている場合、Sync App はこの接続プロパティで指定されたプロキシサーバーポートを通じてのみHTTP トラフィックをルーティングします。ProxyAutoDetect がTrue に設定されている場合(デフォルト)、Sync App は代わりにシステムプロキシ設定で指定されたプロキシサーバーポートを介してHTTP トラフィックをルーティングします。
その他のプロキシタイプについては、FirewallType を参照してください。
ProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法を指定します。
認証タイプは次のいずれかです。
"NONE" 以外のすべての値については、ProxyUser およびProxyPassword 接続プロパティも設定する必要があります。
SOCKS 5 認証のような他の認証タイプを使用するには、FirewallType を参照してください。
ProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。
ProxyUser および ProxyPassword 接続プロパティは、ProxyServer で指定されたHTTP プロキシに対して接続よび認証するために使用されます。
ProxyAuthScheme で利用可能な認証タイプを1つ選択した後、このプロパティを以下のように設定します。
| ProxyAuthScheme の値 | ProxyUser に設定する値 |
| BASIC | プロキシサーバーに登録されているユーザーのユーザー名。 |
| DIGEST | プロキシサーバーに登録されているユーザーのユーザー名。 |
| NEGOTIATE | プロキシサーバーが属するドメインまたは信頼されたドメイン内の有効なユーザーであるWindows ユーザーのユーザー名。user@domain またはdomain\user の形式で指定。 |
| NTLM | プロキシサーバーが属するドメインまたは信頼されたドメイン内の有効なユーザーであるWindows ユーザーのユーザー名。user@domain またはdomain\user の形式で指定。 |
| NONE | ProxyPassword 接続プロパティは設定しないでください。 |
Sync App は、ProxyAutoDetect がFalse に設定されている場合にのみ、このユーザー名を使用します。ProxyAutoDetect がTrue に設定されている場合(デフォルト)、Sync App は代わりにシステムのプロキシ設定で指定されているユーザー名を使用します。
ProxyUser 接続プロパティで指定されたユーザーに紐付けられたパスワード。
ProxyUser および ProxyPassword 接続プロパティは、ProxyServer で指定されたHTTP プロキシに対して接続よび認証するために使用されます。
ProxyAuthScheme で利用可能な認証タイプを1つ選択した後、このプロパティを以下のように設定します。
| ProxyAuthScheme の値 | ProxyPassword に設定する値 |
| BASIC | ProxyUser で指定したプロキシサーバーユーザーに紐付けられたパスワード。 |
| DIGEST | ProxyUser で指定したプロキシサーバーユーザーに紐付けられたパスワード。 |
| NEGOTIATE | ProxyUser で指定したWindows ユーザーアカウントに紐付けられたパスワード。 |
| NTLM | ProxyUser で指定したWindows ユーザーアカウントに紐付けられたパスワード。 |
| NONE | ProxyPassword 接続プロパティは設定しないでください。 |
SOCKS 5 認証もしくは、トンネリングは、FirewallType を参照してください。
Sync App は、ProxyAutoDetect がFalse に設定されている場合にのみ、このパスワードを使用します。ProxyAutoDetect がTrue に設定されている場合(デフォルト)、Sync App は代わりにシステムのプロキシ設定で指定されているパスワードを使用します。
ProxyServer 接続プロパティで指定されたプロキシサーバーに接続する際に使用するSSL タイプ。
このプロパティは、ProxyServer で指定されたHTTP プロキシへの接続にSSL を使用するかどうかを決定します。この接続プロパティには、以下の値を設定できます。
| AUTO | デフォルト設定。ProxyServer がHTTPS URL に設定されている場合、Sync App は、TUNNEL オプションを使用します。ProxyServer がHTTP URL に設定されている場合、コンポーネントはNEVER オプションを使用します。 |
| ALWAYS | 接続は、常にSSL 有効となります。 |
| NEVER | 接続は、SSL 有効になりません。 |
| TUNNEL | 接続はトンネリングプロキシ経由で行われます。プロキシサーバーがリモートホストへの接続を開き、プロキシを経由して通信が行われます。 |
ProxyServer 接続プロパティで設定されたプロキシサーバー経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。
ProxyServer は、このプロパティで定義されたアドレスを除くすべてのアドレスに使用されます。セミコロンを使用してエントリを区切ります。
Sync App はデフォルトでシステムプロキシ設定を使用するため、それ以上の設定は必要ありません。この接続にプロキシ例外を明示的に設定する場合は、ProxyAutoDetect をFalse に設定します。
このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。
| プロパティ | 説明 |
| LogModules | ログファイルに含めるコアモジュールを指定します。セミコロンで区切られたモジュール名のリストを使用します。デフォルトでは、すべてのモジュールがログに記録されます。 |
ログファイルに含めるコアモジュールを指定します。セミコロンで区切られたモジュール名のリストを使用します。デフォルトでは、すべてのモジュールがログに記録されます。
このプロパティは、含めるログモジュールを指定することでログファイルの内容をカスタマイズすることができます。 ログモジュールは、クエリ実行、メタデータ、SSL 通信などの異なる領域にログ情報を分類します。 各モジュールは4文字のコードで表され、文字の名前の場合は末尾にスペースが必要なものもあります。
例えば、EXEC はクエリ実行をログに記録し、INFO は一般的なプロバイダーメッセージをログに記録します。 複数のモジュールを含めるには、次のように名前をセミコロンで区切ります:INFO;EXEC;SSL。
Verbosity 接続プロパティは、このプロパティで指定されたモジュールベースのフィルタリングよりも優先されます。 Verbosity レベルを満たし、指定されたモジュールに属するログエントリのみが記録されます。 利用可能なすべてのモジュールをログファイルに含めるには、このプロパティを空白のままにします。
利用可能なモジュールの完全なリストとログの設定に関する詳細な手引きについては、ログ の「高度なログの記録」セクションを参照してください。
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
| プロパティ | 説明 |
| Location | テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリの場所を指定します。サービスの要件に応じて、これは絶対パスまたは相対パスのいずれかで表されます。 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| Tables | レポートされるテーブルを利用可能なすべてのテーブルのサブセットに制限するオプション設定。例えば、 Tables=TableA,TableB,TableC です。 |
| Views | レポートされたビューを使用可能なテーブルのサブセットに制限するオプション設定。例えば、 Views=ViewA,ViewB,ViewC です。 |
| ListViews | Whether to list views from Apache CouchDB or not. |
テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリの場所を指定します。サービスの要件に応じて、これは絶対パスまたは相対パスのいずれかで表されます。
Location プロパティは、定義をカスタマイズしたり(例えば、カラム名を変更する、カラムを無視するなど)、新しいテーブル、ビュー、またはストアドプロシージャでデータモデルを拡張する場合にのみ必要です。
指定しない場合、デフォルトの場所は%APPDATA%\\CData\\ApacheCouchDB Data Provider\\Schema となり、%APPDATA%はユーザーのコンフィギュレーションディレクトリに設定されます:
| プラットフォーム | %APPDATA% |
| Windows | APPDATA 環境変数の値 |
| Linux | ~/.config |
レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
利用可能なデータベーススキーマをすべてリストすると余分な時間がかかり、パフォーマンスが低下します。 接続文字列にスキーマのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。
レポートされるテーブルを利用可能なすべてのテーブルのサブセットに制限するオプション設定。例えば、 Tables=TableA,TableB,TableC です。
データベースによっては、利用可能なすべてのテーブルをリストするのに時間がかかり、パフォーマンスが低下する場合があります。 接続文字列にテーブルのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。
利用可能なテーブルがたくさんあり、すでに作業したいテーブルが決まっている場合、このプロパティを使用して対象のテーブルのみに表示を制限することができます。これを行うには、カンマ区切りのリストで使用したいテーブルを指定します。各テーブルは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space` です。
Note:複数のスキーマまたはカタログを持つデータソースに接続する場合は、表示する各テーブルを完全修飾名で指定する必要があります。これにより、複数のカタログやスキーマに存在するテーブルが混同されることを防ぎます。
レポートされたビューを使用可能なテーブルのサブセットに制限するオプション設定。例えば、 Views=ViewA,ViewB,ViewC です。
データベースによっては、利用可能なすべてのビューをリストするのに時間がかかり、パフォーマンスが低下する場合があります。 接続文字列にビューのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。
利用可能なビューがたくさんあり、すでに作業したいビューが決まっている場合、このプロパティを使用して対象のビューのみに表示を制限することができます。これを行うには、カンマ区切りのリストで使用したいビューを指定します。各ビューは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space` です。
Note:複数のスキーマまたはカタログを持つデータソースに接続する場合は、確認する各ビューを完全修飾名で指定する必要があります。これにより、複数のカタログやスキーマに存在するビューが混同されることを防ぎます。
Whether to list views from Apache CouchDB or not.
Set this property to true for Apache CouchDB views to show up when listing tables.
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
| プロパティ | 説明 |
| FlattenArrays | Set FlattenArrays to the number of array elements to flatten into columns. Otherwise, arrays are returned as JSON strings. |
| FlattenObjects | Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, embedded objects as raw JSON strings. |
| FlexibleSchema | Set FlexibleSchema to true to scan for additional metadata on the query result set. Otherwise, the metadata will remain the same. |
| MaxRows | 集計やGROUP BY を使用しないクエリで返される最大行数を指定します。 |
| Other | 特定のユースケースに対して追加の隠しプロパティを指定します。これらは通常のprovider の機能では必要ありません。複数のプロパティを定義するには、セミコロンで区切られたリストを使用します。 |
| Pagesize | Apache CouchDB から返される、1ページあたりの結果の最大数を指定します。この設定は、ほとんどのユースケースに最適化されている、データソースによって設定されたデフォルトのページサイズをオーバーライドします。 |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。 |
| RowScanDepth | テーブルで利用可能なカラムを探すためにスキャンする行数の最大値。 |
| SeparatorCharacter | The character or characters used to denote hierarchy. |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。 |
| TypeDetectionScheme | Determines how the provider will scan the data to determine the fields and data types in each document collection. |
| UserDefinedViews | カスタムビューを定義するJSON 構成ファイルへのファイルパスを指定します。provider は、このファイルで指定されたビューを自動的に検出して使用します。 |
Set FlattenArrays to the number of array elements to flatten into columns. Otherwise, arrays are returned as JSON strings.
By default, nested arrays are returned as strings of JSON. The FlattenArrays property can be used to flatten the elements of nested arrays into columns of their own: Set FlattenArrays to the number of elements you want to return from nested arrays. The zero-based index is concatenated to the column name with a dot or the character specified by SeparatorCharacter. Other elements are ignored.
For example, you can return an arbitrary number of elements from an array of strings:
["FLOW-MATIC","LISP","COBOL"]When FlattenArrays is set to 1, the preceding array is flattened into the following table:
| Column Name | Column Value |
| languages.0 | FLOW-MATIC |
Setting FlattenArrays to -1 will flatten all the elements of nested arrays.
Using FlattenArrays is only recommended for arrays that are expected to be short. See NoSQL データベース for other ways to access nested arrays.
Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, embedded objects as raw JSON strings.
The property name is concatenated onto the object name with a dot or the character specified by SeparatorCharacter.
For example, you can flatten the nested objects below at connection time:
[
{ "grade": "A", "score": 2 },
{ "grade": "A", "score": 6 },
{ "grade": "A", "score": 10 },
{ "grade": "A", "score": 9 },
{ "grade": "B", "score": 14 }
]
When FlattenObjects is set to true and FlattenArrays is set to 1, the preceding array is flattened into the following table:
| Column Name | Column Value |
| grades.0.grade | A |
| grades.0.score | 2 |
Set FlexibleSchema to true to scan for additional metadata on the query result set. Otherwise, the metadata will remain the same.
If false, the metadata will remain the same.
集計やGROUP BY を使用しないクエリで返される最大行数を指定します。
このプロパティは、集計やGROUP BY 句を含まないクエリに対してSync App が返す行数の上限を設定します。 この制限により、クエリがデフォルトで過度に大きな結果セットを返さないようにします。
クエリにLIMIT 句が含まれている場合、クエリで指定された値がMaxRows 設定よりも優先されます。 MaxRows が"-1" に設定されている場合、LIMIT 句が明示的にクエリに含まれていない限り、行の制限は行われません。
このプロパティは、非常に大きなデータセットを返す可能性のあるクエリを実行する際に、パフォーマンスを最適化し過剰なリソース消費を防ぐのに役立ちます。
特定のユースケースに対して追加の隠しプロパティを指定します。これらは通常のprovider の機能では必要ありません。複数のプロパティを定義するには、セミコロンで区切られたリストを使用します。
このプロパティは、シニアユーザーが特定のシナリオに対して隠しプロパティを設定できるようにします。 これらの設定は通常のユースケースには必要ありませんが、特定の要件に対応したり、追加の機能を提供したりすることができます。 複数のプロパティをセミコロン区切りのリストで定義できます。
Note: 特定のシナリオや問題に対処するためにサポートチームから助言があった場合にのみ、これらのプロパティを設定することを強く推奨します。
複数のプロパティをセミコロン区切りリストで指定します。
| DefaultColumnSize | データソースがメタデータにカラムの長さを提供しない場合に、文字列フィールドのデフォルトの長さを設定します。デフォルト値は2000です。 |
| ConvertDateTimeToGMT | 日時の値を、マシンのローカルタイムではなくGMT グリニッジ標準時に変換するかどうかを決定します。 |
| RecordToFile=filename | 基底のソケットデータ転送を指定のファイルに記録します。 |
Apache CouchDB から返される、1ページあたりの結果の最大数を指定します。この設定は、ほとんどのユースケースに最適化されている、データソースによって設定されたデフォルトのページサイズをオーバーライドします。
クエリする特定のオブジェクトやサービスエンドポイントの結果を最適化するために、デフォルトのページサイズを調整したい場合があります。 ページサイズを大きくするとパフォーマンスが向上するかもしれませんが、ページあたりのメモリ消費量が増える可能性もあることに注意してください。
テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。
このプロパティを使用すると、Sync App がテーブルカラムとして公開する擬似カラムを定義できます。
個々の擬似カラムを指定するには、以下の形式を使用します。"Table1=Column1;Table1=Column2;Table2=Column3"
すべてのテーブルのすべての擬似カラムを含めるには、次のようにします:"*=*"
テーブルで利用可能なカラムを探すためにスキャンする行数の最大値。
テーブルのカラムはテーブル行をスキャンすることで決定される必要があります。この値はスキャンされる行数の最大値を設定します。
大きい値を設定すると、パフォーマンスが低下する場合があります。小さい値を設定すると、特にnull データがある場合には、データ型を正しく判定できない場合があります。
The character or characters used to denote hierarchy.
In order to flatten out hierarchical structures, the Sync App needs some specifier that states the path to a column through the hierarchy. If this value is "." and a column comes back with the name address.city, this indicates that there is a mapped attribute with a child called city. If your data has columns that already use a single period within the attribute name, set the SeparatorCharacter to a different character or characters.
provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。
このプロパティは、Sync App が操作をキャンセルする前に操作の完了を待機する最大時間を秒単位で制御します。 操作の完了前にタイムアウト時間が経過すると、Sync App は操作をキャンセルして例外をスローします。
タイムアウトは、クエリや操作全体ではなくサーバーとの個々の通信に適用されます。 例えば、各ページング呼び出しがタイムアウト制限内に完了する場合、クエリは60秒を超えて実行を続けることができます。
このプロパティを0に設定するとタイムアウトが無効になり、操作が成功するか、サーバー側のタイムアウト、ネットワークの中断、またはサーバーのリソース制限などの他の条件で失敗するまで無期限に実行されます。 このプロパティは慎重に使用してください。長時間実行される操作がパフォーマンスを低下させたり、応答しなくなる可能性があるためです。
Determines how the provider will scan the data to determine the fields and data types in each document collection.
Since Apache CouchDB is schema-less, the columns in a table must be determined by scanning table rows. Set TypeDetectionScheme to toggle the automatic discovery of data types. Set RowScanDepth to configure type detection.
| None | Setting TypeDetectionScheme to None will return all columns as a string type. |
| RowScan | Setting TypeDetectionScheme to RowScan will scan rows to heuristically determine the data type. The RowScanDepth property determines the number of rows to be scanned. |
Type detection is part of 自動スキーマ検出. Set FlattenArrays and FlattenObjects to configure how the Sync App projects columns over the hierarchical data.
You can fine-tune the discovered columns and data types by calling CreateSchema to generate a schema file. Schema files have a simple format that makes it easy to change column behavior.
カスタムビューを定義するJSON 構成ファイルへのファイルパスを指定します。provider は、このファイルで指定されたビューを自動的に検出して使用します。
このプロパティを使用すると、UserDefinedViews.json というJSON 形式の構成ファイルを通じてカスタムビューを定義および管理できます。 これらのビューはSync App によって自動的に認識され、標準のデータベースビューのようにカスタムSQL クエリを実行できるようになります。 JSON ファイルは、各ビューをルート要素として定義し、その子要素として"query" を持ちます。この"query" にはビューのSQL クエリが含まれています。次に例を示します。
{
"MyView": {
"query": "SELECT * FROM Movies WHERE MyColumn = 'value'"
},
"MyView2": {
"query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
}
}
このプロパティを使用して、1つのファイルに複数のビューを定義し、ファイルパスを指定できます。 例:UserDefinedViews=C:\Path\To\UserDefinedViews.json。 このプロパティを使用すると、指定されたビューのみがSync App によって検知されます。
詳しくは、ユーザー定義ビュー を参照してください。