Update warehouse reference¶
Database objects and procedures¶
The following database objects are created through the configuration/update_warehouse.sql.
PUBLIC.UPDATE_ WAREHOUSE(warehouse_ name STRING)¶
Entry point procedure available to the ADMIN role. This procedure invokes the Java UpdateWarehouseHandler.updateWarehouse handler.
PUBLIC.UPDATE_ WAREHOUSE_ INTERNAL(warehouse_ name STRING)¶
Procedure used for providing additional connector specific logic. By default, it returns 'response_code': 'OK'.
It is invoked by the default UpdateWarehouseCallback. Can be overwritten both in SQL and Java.
Related tables and views¶
Warehouse 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/connector_configuration.sql(See: Connector configuration reference)
Related Java objects¶
The following Java objects from the com.snowflake.connectors.application.configuration.warehouse package and some common components are tightly connected with the above procedures:
UpdateWarehouseHandlerUpdateWarehouseInputValidatorUpdateWarehouseCallbackUpdateWarehouseSdkCallbackUpdateWarehouseHandlerBuilderConnectorStatusServiceConnectorConfigurationServiceConnectorErrorHandler
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 UpdateWarehouseHandler the PUBLIC.UPDATE_WAREHOUSE procedure must be replaced. For example:
Internal procedure¶
The INTERNAL procedure can also be customized through SQL. It can even invoke another Java handler:
Builder approach¶
UpdateWarehouseHandler can be customized using UpdateWarehouseHandlerBuilder. This builder allows the developer to provide custom implementations of the following interfaces:
UpdateWarehouseInputValidatorUpdateWarehouseCallbackConnectorErrorHelper
In case one of them is not provided - the default implementation provided by the SDK will be used.