CData Cloud は、クラウドホスト型のソリューションで、複数の標準サービスやプロトコルにまたがるGreenplum へのアクセスを実現します。MySQL またはSQL Server データベースに接続できるアプリケーションであれば、CData Cloud を介してGreenplum に接続できます。
CData Cloud により、他のOData エンドポイントや標準SQL Server / MySQL データベースと同じように、Greenplum への接続を標準化し、構成することができます。
このページでは、CData Cloud でのGreenplum への接続の確立 のガイド、利用可能なリソースに関する情報、および使用可能な接続プロパティのリファレンスについて説明します。
接続の確立 は、CData Cloud にデータベースを作成するためのGreenplum への認証方法と必要な接続プロパティの設定方法について示します。
利用可能な標準サービスを経由してGreenplum からデータにアクセスする方法と、CData Cloud の管理については、CData Cloud ドキュメント で詳しく説明します。
Database タブで対応するアイコンを選択して、Greenplum に接続します。必須プロパティはSettings にリストされています。Advanced タブには、通常は必要ない接続プロパティが表示されます。
To connect to Greenplum, set the Server, Port (the default port is 5432), and Database connection properties and set the User and Password you want to use to authenticate to the server. If the Database property is not specified, the Cloud connects to the user's default database (it is the same name as the user).
The specific authentication method is setup in the pg_hba.conf file on the Greenplum Server. You can find instructions about authentication setup on the Greenplum Server here. The md5, password and SASL authentication methods do not require additional setup by the CData Cloud.
The Greenplum Server initiates authentication with the Kerberos Server when the CData Cloud attempts a connection. You need to setup Kerberos on the Greenplum Server to activate this authentication method. After you have Kerberos authentication setup on the Greenplum Server, see Kerberos の使用 for details on how to authenticate with Kerberos by the Cloud.
Kerberos 経由でGreenplum への認証を行うには、認証プロパティを定義し、Kerberos が認証チケットを取得する方法を選択する必要があります。
Cloud は、 KRB5CCNAME および / またはKerberosKeytabFile 変数が存在するかどうかに応じて、必要なKerberos チケットを取得する3 つの方法を提供します。
MIT Kerberos 資格情報キャッシュファイル
このオプションを使用すると、MIT Kerberos チケットマネージャーまたはkinit コマンドを使ってチケットを取得できます。このオプションでは、User またはPassword 接続プロパティを設定する必要はありません。
このオプションは、KRB5CCNAME がシステムに作成されている必要があります。
MIT Kerberos 資格情報キャッシュファイル経由でチケット検索を有効にするには:
チケットの取得に成功すると、チケット情報がKerberos チケットマネージャーに表示され、クレデンシャルキャッシュファイルに保存されます。
Cloud はキャッシュファイルを使用してGreenplum に接続するためのKerberos チケットを取得します。
Note: KRB5CCNAME を編集したくない場合は、KerberosTicketCache プロパティを使用してファイルパスを手動で設定することができます。この設定後に、Cloud は指定されたキャッシュファイルを使用してGreenplum に接続するためのKerberos チケットを取得します。
Keytab ファイル
お使いの環境にKRB5CCNAME 環境変数がない場合、Keytab ファイルを使用してKerberos チケットを取得できます。
この方法を使用するには、User プロパティを目的のユーザー名に設定し、KerberosKeytabFile プロパティをユーザーに関連付けられたキータブファイルを指すファイルパスに設定します。
User およびPassword
お使いの環境にKRB5CCNAME 環境変数およびKerberosKeytabFile プロパティが設定されていない場合、ユーザーとパスワードの組み合わせを使用してチケットを取得できます。
この方法を使用するには、User およびPassword プロパティを、Greenplum での認証に使用するユーザー / パスワードの組み合わせに設定します。
このようなクロスレルム認証を有効にするには、KerberosRealm およびKerberosKDC プロパティをユーザー認証に必要な値に設定します。また、KerberosServiceRealm およびKerberosServiceKDC プロパティを、 サービスチケットの取得に必要な値に設定します。
デフォルトでは、Cloud はサーバーの証明書をシステムの信頼できる証明書ストアと照合してSSL / TLS のネゴシエーションを試みます。
別の証明書を指定するには、利用可能なフォーマットについてSSLServerCert プロパティを参照してください。
Greenplum Cloud はクライアント証明書の設定もサポートしています。次を設定すれば、クライアント証明書を使って接続できます。
次のプロパティを設定します。
プロパティ | 説明 |
Server | The host name or IP address of the server. |
Port | The port number of the Greenplum server. |
Database | The name of the Greenplum database. |
User | 認証で使用されるGreenplum ユーザーアカウント。 |
Password | ユーザーの認証で使用されるパスワード。 |
UseSSL | This field sets whether SSL is enabled. |
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
プロパティ | 説明 |
SSHAuthMode | サービスへのSSH トンネルを確立する際に使用される認証方法。 |
SSHClientCert | SSHUser の認証に使用する証明書。 |
SSHClientCertPassword | SSHClientCert キーのパスワード(ある場合)。 |
SSHClientCertSubject | SSH クライアント証明書のサブジェクト。 |
SSHClientCertType | SSHClientCert 秘密鍵の種類。 |
SSHServer | SSH サーバー。 |
SSHPort | SSH ポート。 |
SSHUser | SSH ユーザー。 |
SSHPassword | SSH パスワード。 |
SSHServerFingerprint | SSH サーバーのフィンガープリント。 |
UseSSH | Greenplum 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。 |
プロパティ | 説明 |
Verbosity | ログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。 |
プロパティ | 説明 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
プロパティ | 説明 |
AllowPreparedStatement | Prepare a query statement before its execution. |
FetchResultSetMetadata | This field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server. |
MaxRows | クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。 |
SupportUnboundedColumns | When this property is set, the provider reports Int32.MaxValue as the size of the columns of data type 'bytea' and 'text'. |
Timeout | タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。
プロパティ | 説明 |
Server | The host name or IP address of the server. |
Port | The port number of the Greenplum server. |
Database | The name of the Greenplum database. |
User | 認証で使用されるGreenplum ユーザーアカウント。 |
Password | ユーザーの認証で使用されるパスワード。 |
UseSSL | This field sets whether SSL is enabled. |
The host name or IP address of the server.
string
""
The host name or IP of the server hosting the Greenplum Database. If not set, the default value "localhost" is used.
The name of the Greenplum database.
string
""
The database to connect to when connecting to the Greenplum Server. If a database is not provided, the user's default database will be used.
認証で使用されるGreenplum ユーザーアカウント。
string
""
このフィールドは、Password とともに、Greenplum サーバーに対して認証をするために使われます。
This field sets whether SSL is enabled.
bool
false
This field sets whether the Cloud will attempt to negotiate TLS/SSL connections to the server. By default, the Cloud checks the server's certificate against the system's trusted certificate store. To specify another certificate, set SSLServerCert.
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
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 |
これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。
すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSH プロパティの全リストを提供します。
プロパティ | 説明 |
SSHAuthMode | サービスへのSSH トンネルを確立する際に使用される認証方法。 |
SSHClientCert | SSHUser の認証に使用する証明書。 |
SSHClientCertPassword | SSHClientCert キーのパスワード(ある場合)。 |
SSHClientCertSubject | SSH クライアント証明書のサブジェクト。 |
SSHClientCertType | SSHClientCert 秘密鍵の種類。 |
SSHServer | SSH サーバー。 |
SSHPort | SSH ポート。 |
SSHUser | SSH ユーザー。 |
SSHPassword | SSH パスワード。 |
SSHServerFingerprint | SSH サーバーのフィンガープリント。 |
UseSSH | Greenplum 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。 |
サービスへのSSH トンネルを確立する際に使用される認証方法。
string
"Password"
SSHUser の認証に使用する証明書。
string
""
公開鍵認証を使用するには、SSHClientCert に有効な秘密鍵が含まれている必要があります。 公開鍵はオプションで、含まれていない場合はCloud が秘密鍵から生成します。 Cloud は公開鍵をサーバーに送信し、ユーザーが公開鍵を認証した場合に接続が許可されます。
SSHClientCertType フィールドは、SSHClientCert により指定されたキーストアの種類を指定します。 ストアがパスワードで保護されている場合は、SSHClientCertPassword でパスワードを指定します。
一部の種類のキーストアは、複数のキーを含むことができるコンテナです。 デフォルトでは、Cloud はストアの最初のキーを選択しますが、SSHClientCertSubject を使用して特定のキーを指定することも可能です。
SSHClientCert キーのパスワード(ある場合)。
string
""
このプロパティは、SSHAuthMode がPublicKey に設定され、SSHClientCert が秘密鍵に設定されているSFTP サーバーに認証する場合にのみ使用されます。
SSH クライアント証明書のサブジェクト。
string
"*"
証明書のサブジェクトは、証明書をロードするときにストア内の証明書を検索するために使用されます。
完全に一致するものが見つからない場合、ストアはプロパティの値を含むサブジェクトを検索します。
それでも一致するものが見つからない場合、プロパティは空白で設定され、証明書は選択されません。
"*" に設定すると、証明書ストアの1番目の証明書が選択されます。
証明書のサブジェクトは識別の名前フィールドおよび値のカンマ区切りのリストです。 例えば、"CN=www.server.com, OU=test, C=US, [email protected]"。共通のフィールドとその説明は以下のとおりです。
フィールド | 説明 |
CN | 共通名。一般的には、www.server.com のようなホスト名です。 |
O | 法人名 |
OU | 法人の部署名 |
L | 法人の住所(市町村名) |
S | 法人の住所(都道府県) |
C | 国名 |
E | Eメールアドレス |
フィールド値にカンマが含まれている場合は、それを引用符で囲む必要があります。
SSHClientCert 秘密鍵の種類。
string
"PEMKEY_FILE"
このプロパティには次の値の1つを設定できます。
種類 | 説明 | 許容されるBlob 値 |
MACHINE/USER | Blob 値はサポートされていません。 | |
JKSFILE/JKSBLOB | base64のみ | |
PFXFILE/PFXBLOB | PKCS12形式(.pfx)のファイル。証明書と秘密鍵の両方を含む必要があります。 | base64のみ |
PEMKEY_FILE/PEMKEY_BLOB | PEM 形式のファイル。RSA、DSA、またはOPENSSH の秘密鍵を含む必要があります。オプションで、秘密鍵と一致する証明書を含むことができます。 | base64またはプレーンテキスト。blob をテキストとして入力する場合、改行をスペースに置き換えることができます。 |
PPKFILE/PPKBLOB | puttygen ツールで作成されたPuTTY 形式の秘密鍵。 | base64のみ |
XMLFILE/XMLBLOB | .NET のRSA クラスによって生成される形式のXML キー:RSA.ToXmlString(true)。 | base64またはプレーンテキスト。 |
SSH サーバー。
string
""
SSH サーバー。
SSH ポート。
string
"22"
SSH ポート。
SSH ユーザー。
string
""
SSH ユーザー。
SSH パスワード。
string
""
SSH パスワード。
SSH サーバーのフィンガープリント。
string
""
SSH サーバーのフィンガープリント。
Greenplum 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。
bool
false
デフォルトでは、Cloud はGreenplum に直接接続しようとします。 このオプションを有効にすると、Cloud は代わりにSSHServer とのSSH 接続を確立し、その接続を経由してGreenplum への接続をトンネリングします。
このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。
プロパティ | 説明 |
Verbosity | ログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
プロパティ | 説明 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
string
""
スキーマをデータベースからリストすると、負荷がかかる可能性があります。接続文字列でスキーマのリストを提供すると、 パフォーマンスが向上します。
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
プロパティ | 説明 |
AllowPreparedStatement | Prepare a query statement before its execution. |
FetchResultSetMetadata | This field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server. |
MaxRows | クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。 |
SupportUnboundedColumns | When this property is set, the provider reports Int32.MaxValue as the size of the columns of data type 'bytea' and 'text'. |
Timeout | タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。 |
Prepare a query statement before its execution.
bool
true
If the AllowPreparedStatement property is set to false, statements are parsed each time they are executed. Setting this property to false can be useful if you are executing many different queries only once.
If you are executing the same query repeatedly, you will generally see better performance by leaving this property at the default, true. Preparing the query avoids recompiling the same query over and over. However, prepared statements also require the Cloud to keep the connection active and open while the statement is prepared.
This field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server.
bool
false
By default, the Cloud will not request that the server provides detailed information about resultset columns like the table name or schema name. It requires issuing additional metadata queries via Cloud , and it may affect query performance essentially in some scenarios. Consider setting this property to True when you need such detailed descriptive information for the resultset columns.
クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
int
-1
クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
When this property is set, the provider reports Int32.MaxValue as the size of the columns of data type 'bytea' and 'text'.
bool
true
When false, columns of data type 'text' will report a size of DefaultColumnSize.
タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。
int
30
Timeout が0に設定されている場合は、操作がタイムアウトしません。処理が正常に完了するか、エラー状態になるまで実行されます。
Timeout の有効期限が切れても処理が完了していない場合は、Cloud は例外をスローします。