Data quality: EXECUTE DATA METRIC FUNCTION granted to SNOWFLAKE.PUBLIC by default (Pending)¶
Snowflake will grant the EXECUTE DATA METRIC FUNCTION privilege to the SNOWFLAKE.PUBLIC application role. Account roles inherit that grant, so they can run scheduled data metric functions without a separate account grant. This change isn’t part of a behavior change bundle, and you can’t turn it on or off with SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE or SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE.
Important
The release date isn’t set. The privilege isn’t granted yet. Set the opt-out parameter before the grant if you don’t want every account role to receive it. Setting the parameter doesn’t revoke a grant that already exists.
- Before the change:
A role needs the EXECUTE DATA METRIC FUNCTION privilege on the account to associate a data metric function with a table or view and to run a scheduled data metric function. An account administrator grants that privilege to each role that needs it.
To set the
DATA_METRIC_SCHEDULEparameter on a table, the role needs OWNERSHIP on the table, or any other privilege on the table plus EXECUTE DATA METRIC FUNCTION on the account.- After the change:
Snowflake grants EXECUTE DATA METRIC FUNCTION to the
SNOWFLAKE.PUBLICapplication role.SNOWFLAKE.PUBLICis granted to the account-level PUBLIC role, so account roles inherit the privilege.Database roles don’t inherit
SNOWFLAKE.PUBLIC. A database role still can’t satisfy this account privilege. Native apps don’t receive the privilege onSNOWFLAKE.APP_PUBLIC. An installed app doesn’t run scheduled data metric functions. Apps that view results continue to use theSNOWFLAKE.DATA_METRIC_USERdatabase role.For an account role, any privilege on a table is enough to set
DATA_METRIC_SCHEDULE. USAGE on the data metric function, and OWNERSHIP or SELECT with EXECUTE AS ROLE on the table, are unchanged.
Opt out before the grant¶
To keep today’s behavior, set DISABLE_EXECUTE_DATA_METRIC_FUNCTION_GRANT_TO_PUBLIC to TRUE before Snowflake creates the grant:
The setting takes effect the next time Snowflake runs setup or upgrade for your account. It doesn’t revoke a grant that already exists. The default is FALSE.
Revoke or restore the grant¶
SNOWFLAKE.PUBLIC is an application role on the SNOWFLAKE database. It isn’t the account-level PUBLIC role. SHOW GRANTS TO ROLE PUBLIC doesn’t list this grant.
Confirm the grant as ACCOUNTADMIN:
After the grant exists, revoke it with the SNOWFLAKE.LOCAL procedure. A REVOKE EXECUTE DATA METRIC FUNCTION ON ACCOUNT FROM ROLE PUBLIC statement doesn’t remove the SNOWFLAKE.PUBLIC grant.
To grant it again:
You can still grant the privilege to individual roles with GRANT EXECUTE DATA METRIC FUNCTION ON ACCOUNT TO ROLE <role_name>.
Change log¶
| Update | Date |
|---|---|
| Initial publication | 26-Oct-26 |
Ref: 2471