DELETE_WAREHOUSE_SCHEDULE
Stored procedure DELETE_WAREHOUSE_SCHEDULE
is a Snowflake stored procedure written in Python that is used to delete a warehouse schedule period object.
This procedure is defined in database SUNDECK
(database where Snowflake NativeApp is installed) schema ADMIN
.
ACCOUNTADMIN privilege is required to run this stored procedure.
- See also:
- CREATE_WAREHOUSE_SCHEDULE, UPDATE_WAREHOUSE_SCHEDULE, ENABLE_WAREHOUSE_SCHEDULING, DISABLE_WAREHOUSE_SCHEDULING, RESET_WAREHOUSE_SCHEDULING, CREATE_DEFAULT_WAREHOUSE_SCHEDULES
DELETE_WAREHOUSE_SCHEDULE(<warehouse_name>,
<start_at>,
<finish_at>,
<is_weekday>)
<warehouse_name>
- a string that represents warehouse name.
<start_at>
- schedule period start time.
<finish_at>
- schedule period end time.
<is_weekday>
True
orFalse
based on whether schedule is a Weekday or a Weekend.
NULL
- if warehouse schedule period was successfully deleted.
<error>
- error message string in the case of failure to delete warehouse schedule period.
To delete warehouse schedule period with the Large warehouse:
ube#COMPUTE_WH@SUNDECK.ADMIN>select
name,
start_at,
finish_at,
size,
resume,
weekday,
enabled
from
catalog.warehouse_schedules
where
name = 'BATCH' and weekday = True;
+-------+----------+-----------+---------+--------+---------+---------+
| NAME | START_AT | FINISH_AT | SIZE | RESUME | WEEKDAY | ENABLED |
|-------+----------+-----------+---------+--------+---------+---------|
| BATCH | 00:00:00 | 18:00:00 | X-Small | True | True | False |
| BATCH | 18:00:00 | 23:59:00 | Large | True | True | False |
+-------+----------+-----------+---------+--------+---------+---------+
2 Row(s) produced.
ube#COMPUTE_WH@SUNDECK.ADMIN>call ADMIN.DELETE_WAREHOUSE_SCHEDULE('BATCH', '18:00', '23:59:00', TRUE);
+---------------------------+
| DELETE_WAREHOUSE_SCHEDULE |
|---------------------------|
| NULL |
+---------------------------+
1 Row(s) produced.
ube#COMPUTE_WH@SUNDECK.ADMIN>select
name,
start_at,
finish_at,
size,
resume,
weekday,
enabled
from
catalog.warehouse_schedules
where
name = 'BATCH' and weekday = True;
+-------+----------+-----------+---------+--------+---------+---------+
| NAME | START_AT | FINISH_AT | SIZE | RESUME | WEEKDAY | ENABLED |
|-------+----------+-----------+---------+--------+---------+---------|
| BATCH | 00:00:00 | 23:59:00 | X-Small | True | True | False |
+-------+----------+-----------+---------+--------+---------+---------+
1 Row(s) produced.