Update connection configuration reference¶
Database objects and procedures¶
The following database objects are created through the configuration/update_connection_configuration.sql
PUBLIC.UPDATE_ CONNECTION_ CONFIGURATION( connection_ configuration VARIANT)¶
Entry point procedure available to the ADMIN role. This procedure invokes the Java UpdateConnectionConfigurationHandler.updateConnectionConfiguration handler.
PUBLIC.UPDATE_ CONNECTION_ CONFIGURATION_ VALIDATE( connection_ configuration VARIANT)¶
Procedure used for providing additional connector specific validation logic. By default, it returns 'response_code': 'OK'.
It is invoked by the default ConnectionConfigurationInputValidator. Can be overwritten both in SQL and Java.
PUBLIC.DRAFT_ CONNECTION_ CONFIGURATION_ INTERNAL( connection_ configuration VARIANT)¶
Procedure used for providing additional connector specific logic. By default, it returns 'response_code': 'OK'.
It is invoked by the default ConnectionConfigurationCallback. Can be overwritten both in SQL and Java.
Related tables and views¶
Connection configuration update 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)configuration/connection_configuration.sql(See: Connection configuration reference)
Related Java objects¶
The following Java objects from the com.snowflake.connectors.application.configuration.connection package and some common components are tightly connected with the above procedures:
UpdateConnectionConfigurationHandlerConnectionConfigurationInputValidatorConnectionConfigurationCallbackDraftConnectionValidatorConnectionValidatorUpdateConnectionConfigurationHandlerBuilderConnectorStatusServiceConnectorConfigurationServiceConnectorErrorHandler
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 a custom implementation of UpdateConnectionConfigurationHandler the PUBLIC.UPDATE_CONNECTION_CONFIGURATION procedure must be replaced. For example:
Internal procedures¶
The VALIDATE and INTERNAL procedures can also be customized through SQL. It can even invoke another Java handler:
Builder approach¶
UpdateConnectionConfigurationHandler can be customized using UpdateConnectionConfigurationHandlerBuilder. This builder allows the developer to provide custom implementations of the following interfaces:
ConnectionConfigurationInputValidatorConnectionConfigurationCallbackDraftConnectionValidatorConnectionConfigurationCallbackConnectionValidatorConnectorErrorHelper
In case one of them is not provided - the default implementation provided by the SDK will be used.