Class UpdateWarehouseInstanceHandler


  • public class UpdateWarehouseInstanceHandler
    extends Object
    Handler for the Task Reactor instance warehouse update. A new instance of the handler must be created using the builder.
    • Method Detail

      • updateWarehouse

        public static Variant updateWarehouse​(Session session,
                                              String warehouseName,
                                              String instanceSchema)
        Default handler method for the TASK_REACTOR.UPDATE_WAREHOUSE procedure.

        Updates warehouse used by all tasks within the specified Task Reactor instance by inserting the UPDATE_WAREHOUSE command into the Task Reactor command queue.

        Parameters:
        session - Snowpark session object
        warehouseName - new warehouse name provided to the handler
        instanceSchema - task reactor instance name
        Returns:
        a variant representing the ConnectorResponse returned by updateWarehouse
      • updateWarehouse

        public ConnectorResponse updateWarehouse​(String warehouseName,
                                                 String instanceSchema)
        Executes the main logic of the handler, with logging using withExceptionLogging.
        Parameters:
        warehouseName - name of the warehouse
        instanceSchema - instance name
        Returns:
        a response with the code OK if the execution was successful, otherwise a response with an error code and an error message