Connection and Data Source Management
You are looking at an older version of the documentation. The latest version is found here.
In the Data Virtuality Server, different data sources can be queried using specific connectors. On this page, you will find the syntax and lists of parameters for dedicated stored procedures; for more general information on their use, please refer to the Connecting Data Sources chapter.
SYSADMIN.createConnection
This procedure creates a connection:
SYSADMIN.createConnection(IN name string, IN jbossCLITemplateName string, IN connectionOrResourceAdapterProperties string, IN encryptedProperties string)
It takes the following parameters:
Parameter | Description |
---|---|
name | Name of the new connection |
jbossCLITemplateName | Name of the CLI template used |
connectionOrResourceAdapterProperties | Properties of the new connection; optional |
encryptedProperties | Optional encrypted properties |
The actual JNDI name will be formed from the given name and the CLI template name joined with the minus sign (like template-name
).
SYSADMIN.importConnection
This procedure imports a connection which will not fail if a connection cannot be established:
SYSADMIN.importConnection(IN name string, IN jbossCLITemplateName string, IN connectionOrResourceAdapterProperties string, IN encryptedProperties string)
It takes the following parameters:
Parameter | Description |
---|---|
name | Name of the imported connection |
jbossCLITemplateName | Name of the CLI template used |
connectionOrResourceAdapterProperties | Properties of the new connection; optional |
encryptedProperties | Optional encrypted properties |
The actual JNDI name will be formed from the given name and the CLI template name joined with the minus sign (like template-name
).
SYSADMIN.removeConnection
This procedure removes a connection:
SYSADMIN.removeConnection(IN name string)
It takes a single parameter: name
of the connection to be removed.
SYSADMIN.createDataSource
This procedure creates a data source:
SYSADMIN.createDataSource(IN name string, IN translator string, IN modelProperties string, IN translatorProperties string, encryptedModelProperties string, encryptedTranslatorProperties string)
It takes the following parameters:
Parameter | Description |
---|---|
name | Name of the new data source |
translator | Name of translator |
modelProperties | Model properties; optional |
translatorProperties | Translator properties; optional |
encryptedModelProperties | Optional encrypted model properties |
encryptedTranslatorProperties | Optional encrypted translator properties |
SYSADMIN.deployModularConnector
procedure before creating the data source. Please refer to Modular Connectors Management for more details.
SYSADMIN.importDataSource
This procedure imports a data source:
SYSADMIN.importDataSource(IN name string, IN translator string, IN modelProperties string, IN translatorProperties string, encryptedModelProperties string, encryptedTranslatorProperties string)
It takes the following parameters:
Parameter | Description |
---|---|
name | Name of the imported data source |
translator | Name of translator |
modelProperties | Model properties; optional |
translatorProperties | Translator properties; optional |
encryptedModelProperties | Optional encrypted model properties |
encryptedTranslatorProperties | Optional encrypted translator properties |
SYSADMIN.deployModularConnector
procedure before importing the data source. Please refer to Modular Connectors Management for more details.
SYSADMIN.recreateConnection
This procedure removes the specified connection and then recreates it using the stored template name and properties:
SYSADMIN.recreateConnection(IN name string)
SYSADMIN.removeDataSource
This procedure removes the specified data source:
SYSADMIN.removeDataSource(IN name string)
SYSADMIN.refreshDataSource
This procedure refreshes the specified data source:
SYSADMIN.refreshDataSource(IN name string, OUT reply integer NOT NULL RESULT)
The procedure may have one of the following return values:
Return value | Description |
---|---|
-1 | Value returned when refreshing a virtual or system schema (VIEWS , SYS , SYSADMIN , PG_CATALOG , UTILS , SYSADMIN_VDB , SYSLOG , and INFORMATION_SCHEMA ) |
1 | Everything is OK |
0 | The procedure has already been called by someone else |
SYSADMIN.refreshSchema
This procedure refreshes the specified schema, physical or virtual:
SYSADMIN.refreshSchema(IN name string)
SYSADMIN.refreshAllDataSources
This procedure refreshes all data sources:
SYSADMIN.refreshAllDataSources()
SYSADMIN.refreshAllSchemas
This procedure refreshes all schemas:
SYSADMIN.refreshAllSchemas()
SYSADMIN.testConnection
This procedure checks the connection with the given properties:
SYSADMIN.testConnection(IN jbossCLITemplateName string, IN connectionOrResourceAdapterProperties string, IN translator string, IN translatorProperties string)
SYSADMIN.getDataSourceMetadataDiff
This procedure returns metadata difference for the specified data source:
SYSADMIN.getDataSourceMetadataDiff(IN name string)
SYSADMIN.getAllDataSourcesMetadataDiff
This procedure returns metadata differences for all data sources:
SYSADMIN.getAllDataSourcesMetadataDiff()
SYSADMIN.getCatalogs
This procedure returns the list of data source catalogs:
SYSADMIN.getCatalogs"("connectionName" => 'connection_name')
It takes a single parameter, the connection name, and returns values which can be used in creating a data source:
Database | Returned values | Additional Information |
---|---|---|
BigQuery |
| Connection without a |
PostgreSQL | database list | |
Redshift | database list | |
Snowflake | database list | |
SQL Server | database list |
SYSADMIN.getSchemas
This procedure returns the list of data source schemas:
SYSADMIN.getSchemas"("connectionName" => 'connection_name')
It takes a single parameter, the connection name, and returns values that can be used in creating a data source:
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 |
Connection Properties Validation
Connection properties are validated against the CLI templates when a connection is created, edited, deleted, and tested. Connection parameters not present in the CLI template are not accepted.