CData Virtuality Server では、特定のコネクタを使用してさまざまなデータソースをクエリできます。このページでは、専用のストアドプロシージャの構文とパラメータの一覧を示します。ストアドプロシージャの使用に関する一般的な情報については、Connecting Data Sourcesの章を参照してください。
SYSADMIN.createConnection
このプロシージャは接続を作成します:
SYSADMIN.createConnection(
IN
name
string,
IN
jbossCLITemplateName string,
IN
connectionOrResourceAdapterProperties string,
IN
encryptedProperties string)
以下のパラメータを取ります:
Parameter | Description |
---|---|
| Name of the new connection |
| Name of the CLI template used |
| Properties of the new connection, optional |
| Encrypted properties; optional |
実際のJNDI名は、与えられた名前とCLIテンプレート名をマイナス記号で結合したものになります(template-name
のように)。
SYSADMIN.importConnection
このプロシージャは、接続が確立できなくても失敗しない接続をインポートします:
SYSADMIN.importConnection(
IN
name
string,
IN
jbossCLITemplateName string,
IN
connectionOrResourceAdapterProperties string,
IN
encryptedProperties string)
以下のパラメータを取ります:
Parameter | Description |
---|---|
| Name of the imported connection |
| Name of the CLI template used |
| Properties of the new connection; optional |
| Encrypted properties; optional |
実際のJNDI名は、与えられた名前とCLIテンプレート名をマイナス記号で結合したものになります(template-name
のように)。
SYSADMIN.removeConnection
このプロシージャは接続を削除します:
SYSADMIN.removeConnection(
IN
name
string)
name
削除する接続のパラメータを1つ受け取ります。
SYSADMIN.createDataSource
このプロシージャはデータソースを作成します:
SYSADMIN.createDataSource(
IN
name
string,
IN
translator string,
IN
modelProperties string,
IN
translatorProperties string, encryptedModelProperties string, encryptedTranslatorProperties string)
以下のパラメータを取ります:
Parameter | Description |
---|---|
| Name of the new data source |
| Name of translator |
| Model properties; optional |
| Translator properties; optional |
| Encrypted model properties; optional |
| Encrypted translator properties; optional |
SYSADMIN.deployModularConnector
procedure before creating the data source. Please refer to Modular Connectors Management for more details.SYSADMIN.createOrReplaceDatasource
このプロシージャでは、データソースまたは接続パラメータのいずれかが既存のデータソースまたは接続定義と異なる場合に、データソースを不足している接続とともに作成するか、既存のデータソースを置き換えます:
SYSADMIN.createOrReplaceDatasource(
IN
name
string,
IN
translator string,
IN
modelProperties string,
IN
translatorProperties string,
IN
encryptedModelProperties string,
IN
encryptedTranslatorProperties string,
IN
connectionTemplateName string,
IN
connectionProperties string,
IN
connectionEncryptedProperties string,
IN
enableReplace boolean
DEFAULT
'false'
)
以下のパラメータを取ります:
Parameter | Description |
---|---|
| Name of the data source and its connection |
| Name of translator |
| Model properties; optional |
| Translator properties; optional |
| Encrypted model properties; optional |
| Encrypted translator properties; optional |
| Name of the CLI template used |
| Properties of the connection; optional |
| Encrypted properties; optional |
| If set to |
SYSADMIN.deployModularConnector
procedure before creating the data source. Please refer to Modular Connectors Management for more details.SYSADMIN.importDataSource
このプロシージャはデータソースをインポートします:
SYSADMIN.importDataSource(
IN
name
string,
IN
translator string,
IN
modelProperties string,
IN
translatorProperties string, encryptedModelProperties string, encryptedTranslatorProperties string)
以下のパラメータを取ります:
Parameter | Description |
---|---|
| Name of the imported data source |
| Name of translator |
| Model properties; optional |
| Translator properties; optional |
| Encrypted model properties; optional |
| Encrypted translator properties; optional |
SYSADMIN.deployModularConnector
procedure before importing the data source. Please refer to Modular Connectors Management for more details.SYSADMIN.recreateConnection
このプロシージャは、指定された接続を削除し、格納されているテンプレート名とプロパティを使用して再作成します:
SYSADMIN.recreateConnection(
IN
name
string)
SYSADMIN.removeDataSource
このプロシージャは、指定されたデータソースを削除します:
SYSADMIN.removeDataSource(
IN
name
string)
SYSADMIN.refreshTables
このプロシージャは、テーブルをリフレッシュします:
SYSADMIN.refreshTables(
IN
schemaName string
NOT
NULL
,
IN
tableNamePattern string
NOT
NULL
)
指定されたパターン(LIKE
句のようなSQL パターン)で選択されたテーブルをリフレッシュします。
tableNamePattern の値は大文字と小文字を区別します。
SYSADMIN.refreshTables
procedure available since v4.10
SYSADMIN.refreshDataSource
このプロシージャは、指定されたデータソースを更新します:
SYSADMIN.refreshDataSource(
IN
name
string,
OUT
reply
integer
NOT
NULL
RESULT)
プロシージャは、次のいずれかの戻り値を持つことができます:
Return value | Description |
---|---|
| Value returned when refreshing a virtual or system schema ( |
| Everything is OK |
| The procedure has already been called by someone else |
SYSADMIN.refreshTables and SYSADMIN.refreshDataSource Parallel Calls Behaviour
SYSADMIN.refreshTables Calls
同じデータソースからのテーブルまたはパターンに対するSYSADMIN.refreshTables の呼び出しはキューに入れられ、呼び出された順に実行されます。このメカニズムは、呼び出しが順番に処理されるようにすることで、同時実行の問題を防ぎます。
Combined SYSADMIN.refreshDataSource with SYSADMIN.refreshTables Calls
SYSADMIN.refreshDataSource
呼び出しがSYSADMIN.refreshTables
と組み合わされると、それらはキューに入れられ、同じ順序で実行されます。
Multiple SYSADMIN.refreshDataSource Calls
同じデータソースに対する2つ以上のSYSADMIN.refreshDataSource
呼び出しが、SYSADMIN.refreshTables
呼び出しを挟まずに発生した場合:
- 最初のクエリだけが実行されます;
- それ以降の呼び出しは、最初のクエリが完了するまで待機し、完了すると最初のクエリと同じステータスを受け取ります。
SYSADMIN.refreshSchema
このプロシージャは、物理または仮想の指定されたスキーマをリフレッシュします:
SYSADMIN.refreshSchema(
IN
name
string)
SYSADMIN.refreshAllDataSources
このプロシージャはすべてのデータソースをリフレッシュします:
SYSADMIN.refreshAllDataSources()
SYSADMIN.refreshAllSchemas
このプロシージャはすべてのスキーマをリフレッシュします:
SYSADMIN.refreshAllSchemas()
SYSADMIN.testConnection
このプロシージャは、指定されたプロパティとの接続をチェックします:
SYSADMIN.testConnection(
IN
jbossCLITemplateName string,
IN
connectionOrResourceAdapterProperties string,
IN
translator string,
IN
translatorProperties string,
IN
encryptedProperties string,
IN
encryptedTranslatorProperties string)
encryptedProperties
and encryptedTranslatorProperties
properties of SYSADMIN.testConnection
are available since v4.4
SYSADMIN.getDataSourceMetadataDiff
このプロシージャは、指定されたデータソースのメタデータの差分を返します:
SYSADMIN.getDataSourceMetadataDiff(
IN
name
string)
SYSADMIN.getAllDataSourcesMetadataDiff
このプロシージャは、すべてのデータソースのメタデータの差分を返します:
SYSADMIN.getAllDataSourcesMetadataDiff()
SYSADMIN.getCatalogs
このプロシージャは、データソースカタログのリストを返します:
SYSADMIN.getCatalogs
"("
connectionName" =>
'connection_name'
)
接続名という1つのパラメータを受け取り、データソースの作成に使用できる値を返します:
Database | Returned values | Additional Information |
---|---|---|
BigQuery |
| Connection without a |
PostgreSQL | database list | |
Redshift | database list | |
Snowflake | database list | |
SQL Server | database list |
SYSADMIN.getSchemas
このプロシージャは、データソース スキーマのリストを返します:
SYSADMIN.getSchemas
"("
connectionName" =>
'connection_name'
)
接続名という1つのパラメータを受け取り、データソースの作成に使用できる値を返します:
Database | Returned values | Additional Information |
---|---|---|
BigQuery | Schemas within a project | Connection without a |
Oracle | Namespace within a database | Connection without a database cannot be created |
PostgreSQL | Schemas within a database | Without specifying a database, PostgreSQL only lists system schemas and the default one (public) for the default database (postgres) |
Redshift | Schemas within a database | Redshift cannot list schemas without specifying a database |
Snowflake | Schema list per database | Lists all schemas if the |
SQL Server | Schema list per database | All schemas are listed regardless of a database being specified |
SYSADMIN.getDataSourcePropertiesHierarchy
このプロシージャは、CData ドライバーのプロパティ階層をJSON 形式で返します。 デフォルトコンテキストは _datahubh
です。
SYSADMIN.getDataSourcePropertiesHierarchy(
IN
driverName string
NOT
NULL
,
IN
context string,
OUT
hierarchy string)
Mandatory Parameters
このプロシージャには以下の必須パラメータがあります:
Parameter | Description |
---|---|
| The name of the driver |
SYSADMIN.getDataSourcePropertiesHierarchy
available since v4.6
Connection Properties Validation
接続のプロパティは、接続が作成、編集、削除、およびテストされるときに、CLI テンプレートに対して検証されます。CLI テンプレートに存在しない接続パラメータは受け付けられません。