MY_BUDGET_SUMMARY
functionsupportedAccounts, users, sessions, warehousesReturns the calling user’s limits, usage, and current block status for each per-user quota that applies to them in the current account. Any user can call this function. It returns only the calling user’s information, so users can check how much of their per-user limit they’ve used without asking an administrator and without privileges on the quota or on the ACCOUNT_USAGE schema.
Syntax
SNOWFLAKE.LOCAL.MY_BUDGET_SUMMARY()
Returns
The function returns one row for each quota that applies to the calling user and each cycle that has a per-user limit. For example, a quota with daily, weekly, and monthly limits returns three rows. Cycles without a limit don’t return a row. If no quota applies to the calling user, the function returns no rows.
Usage notes
- Call the function in the FROM clause with the TABLE keyword: SELECT * FROM TABLE(SNOWFLAKE.LOCAL.MY_BUDGET_SUMMARY());.
- Cycles start and end on UTC boundaries. START_TIME and END_TIME are displayed in the session’s time zone.
- DOMAINS lists only domains, even if the quota monitors selected resources within a domain. USAGE includes only usage on the resources that the quota monitors.
- Usage can count toward more than one quota. If quotas monitor overlapping domains, don’t add USAGE across those quotas to calculate total usage, because the overlapping usage would be double-counted.
- Usage data is refreshed periodically, typically within minutes. Recent activity might not appear yet in USAGE or PERCENT_CONSUMED.
- Because STATUS is updated with usage data, it can briefly lag behind enforcement. The calling user might already be blocked before STATUS shows BLOCKED.
- The function returns information only for the current account.
Access control requirements
No privileges are required. Any user can call this function, and it returns only the calling user’s information.