<budget_name>!REMOVE_RESOURCE¶
Remove an object from a custom budget. The object must be removed by reference.
Syntax¶
<budget_name>!REMOVE_RESOURCE( { '<object_reference>' | <reference_statement> } )
Arguments¶
'object_reference'
The serialized string representation that resolves to an object. This string is the output of the SYSTEM$REFERENCE function.
reference_statement
A SYSTEM$REFERENCE statement that creates a reference for the object to be removed from the budget.
Returns¶
Successfully removed resource from resource group
Access Control Requirements¶
The following minimum privileges and roles are required to called this method on a custom budget:
A role with the ADMIN instance role for the budget instance.
A role granted the USAGE privilege on the database and schema that contains the budget instance.
A role with the APPLYBUDGET privilege on the object being removed.
Usage Notes¶
This method can only be called on custom budget instances.
Examples¶
Remove table t1
from budget my_budget
in schema budget_db.budget_schema
by using
an identifier for a reference:
CALL budget_db.budget_schema.my_budget!REMOVE_RESOURCE(
'ENT_REF_TABLE_5862683050074_5AEB8D58FB3ACF249F2E35F365A9357C46BB00D7');
Remove table t1
from budget my_budget
in schema budget_db.budget_schema
by using
a SYSTEM$REFERENCE statement:
CALL budget_db.budget_schema.my_budget!REMOVE_RESOURCE(
SELECT SYSTEM$REFERENCE('TABLE', 't1', 'SESSION', 'APPLYBUDGET')