Update resource reference¶
Database objects and procedures¶
The following database objects are created when the file ingestion/resource_management.sql is executed.
PUBLIC.UPDATE_RESOURCE(resource_ingestion_definition_id VARCHAR, ingestion_configurations VARIANT)¶
Entry point procedure available to the ADMIN role. This procedure invokes the Java function UpdateResourceHandler.updateResource.
PUBLIC.UPDATE_RESOURCE_VALIDATE(resource_ingestion_definition_id VARCHAR, ingestion_configurations VARIANT)¶
Procedure used for connector specific validation of update process. By default, it returns 'response_code': 'OK'.
It is invoked by DefaultUpdateResourceValidator. Can be overwritten both in SQL and Java.
PUBLIC.PRE_UPDATE_RESOURCE(resource_ingestion_definition_id VARCHAR, ingestion_configurations VARIANT)¶
Procedure used for adding connector specific logic which is invoked before a resource is updated.
By default, it returns 'response_code': 'OK'.
It is invoked by DefaultPreUpdateResourceCallback. Can be overwritten both in SQL and Java.
PUBLIC.POST_UPDATE_RESOURCE(resource_ingestion_definition_id VARCHAR, ingestion_configurations VARIANT)¶
Procedure used for adding connector specific logic which is invoked after a resource is updated.
By default, it returns 'response_code': 'OK'.
It is invoked by DefaultPostUpdateResourceCallback. Can be overwritten both in SQL and Java.
Custom handler¶
The handler and its internals can be customized using the following approaches.
Procedure replacement approach¶
The following components can be replaced using SQL.
Handler¶
To provide whole custom implementation of UpdateResourceHandler, the PUBLIC.UPDATE_RESOURCE procedure must be replaced. For example:
Internal procedures¶
Internal procedures UPDATE_RESOURCE_VALIDATE, PRE_UPDATE_RESOURCE and POST_UPDATE_RESOURCE can be also customized through the SQL. These procedures can also invoke other Java handlers:
Builder approach¶
UpdateResourceHandler can be customized using UpdateResourceHandlerBuilder. This builder allows user to provide custom implementations of the following interfaces:
UpdateResourceValidatorPreUpdateResourceCallbackPostUpdateResourceCallbackConnectorErrorHelper
In case a function is not provided the default implementation provided by the SDK will be used.