Connection configuration reference¶
Database objects and procedures¶
The following database objects are created through the file configuration/connection_configuration.sql.
PUBLIC.SET_ CONNECTION_ CONFIGURATION (connection_ configuration VARIANT)¶
Entry point procedure available to ADMIN role. This procedure invokes the Java function ConnectionConfigurationHandler.setConnectionConfiguration().
PUBLIC.SET_ CONNECTION_ CONFIGURATION_ VALIDATE (connection_ configuration VARIANT)¶
Procedure used for Connector specific validation of the configuration. It can also be used to transform some parts of the configuration.
Transformed configuration needs to be returned as additional "config" property. By default, it returns 'response_code': 'OK'.
It is invoked by the DefaultConnectionConfigurationInputValidator. Can be overwritten both in SQL and Java.
PUBLIC.SET_ CONNECTION_ CONFIGURATION_ INTERNAL (connection_ configuration VARIANT)¶
Procedure used for Connector specific additional connection configuration, for example adding external access integration to other procedures.
By default, it returns 'response_code': 'OK'. It is invoked by the InternalConnectionConfigurationCallback. Can be overwritten both in SQL and Java.
PUBLIC.GET_ CONNECTION_ CONFIGURATION()¶
A procedure to retrieve current connection configuration from the internal table. It is available to ADMIN and VIEWER users.
Related tables and views¶
Connector configuration is related to and dependent on the objects from the following files:
core.sql(See Core SQL reference)configuration/app_config.sql(See: App config SQL reference)
PUBLIC.TEST_ CONNECTION()¶
This procedure is not provided by default in any file, but is necessary for the Connection Configuration feature.
This procedure will be used as a light weight way to check access to the external source system.
Related Java objects¶
The following Java objects from the com.snowflake.connectors.application.configuration.connector package and some common components are tightly connected with the above procedures:
Custom handler¶
Handler and its internals can be customized using the following two approaches.
Procedure replacement approach¶
The following components can be replaced using SQL.
Handler¶
To provide whole custom implementation of the ConnectionConfigurationHandler the PUBLIC.SET_CONNECTION_CONFIGURATION procedure must be replaced. For example:
Internal procedures¶
Internal VALIDATE and INTERNAL procedures can be also customized through the SQL. They can even invoke another Java handler:
Builder approach¶
ConnectionConfigurationHandler can be customized using ConnectionConfigurationHandlerBuilder. This builder allows user to provide custom implementations of the following interfaces:
- ConnectionConfigurationInputValidator
- ConnectionConfigurationCallback
- ConnectionValidator
- ConnectorErrorHelper
In case one of them is not provided the default implementation provided by the SDK will be used.