Hiding Download Button in Snowsight: A Step-by-Step Guide

Even with great governance in place, I still get asked a lot: “Can we hide the Download results button in Snowsight for certain users?” It’s a fair question-organizations want to reduce casual data export from the UI without shutting it off for everyone.

Snowflake gives us a clean control for this: DISABLE_UI_DOWNLOAD_BUTTON. In this quick walkthrough, I’ll set the context, show you a Python stored procedure that applies the setting in bulk to all members of a role, and cover how to verify and roll it back.

Let’s dive in.

What This Setting Does

  • DISABLE_UI_DOWNLOAD_BUTTON can be set at the account or user level (there’s no role scope).
  • User-level wins: If you set it to TRUE for a user, the download button is hidden in Snowsight for that user-no matter which role they’re using.

Create the Stored Procedure

This procedure accepts a role name and a parameter/value pair, finds all current users granted that role, and applies the parameter to each user via ALTER USER.

USE ROLE ACCOUNTADMIN; USE SCHEMA <DB>.<SCHEMA>; CREATE OR REPLACE PROCEDURE SET_USER_PARAMETER_FOR_ROLE( ROLE_NAME STRING, PARAMETER_NAME STRING, PARAMETER_VALUE STRING ) RETURNS STRING LANGUAGE PYTHON RUNTIME_VERSION = '3.11' PACKAGES = ('snowflake-snowpark-python') HANDLER = 'set_user_parameter' EXECUTE AS OWNER def set_user_parameter(session, role_name, parameter_name, parameter_value): try: query = f""" SELECT grantee_name FROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS WHERE ROLE = '{role_name}' AND deleted_on IS NULL """ result = session.sql(query).collect() users_processed = 0 for row in result: user_name = row['GRANTEE_NAME'] alter_command = f"ALTER USER {user_name} SET {parameter_name} = {parameter_value}" session.sql(alter_command).collect() users_processed += 1 return f"Successfully set {parameter_name} = {parameter_value} for {users_processed} users with role {role_name}" except Exception as e: return f"Error occurred: {str(e)}"USE ROLE ACCOUNTADMIN;
USE SCHEMA <DB>.<SCHEMA>;
CREATE OR REPLACE PROCEDURE SET_USER_PARAMETER_FOR_ROLE(
ROLE_NAME STRING,
PARAMETER_NAME STRING,
PARAMETER_VALUE STRING
)
RETURNS STRING
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python')
HANDLER = 'set_user_parameter'
EXECUTE AS OWNER
def set_user_parameter(session, role_name, parameter_name, parameter_value):
try:
query = f"""
SELECT grantee_name
FROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS
WHERE ROLE = '{role_name}'
AND deleted_on IS NULL
"""
result = session.sql(query).collect()
users_processed = 0
for row in result:
user_name = row['GRANTEE_NAME']
alter_command = f"ALTER USER {user_name} SET {parameter_name} = {parameter_value}"
session.sql(alter_command).collect()
users_processed += 1
return f"Successfully set {parameter_name} = {parameter_value} for {users_processed} users with role {role_name}"
except Exception as e:
return f"Error occurred: {str(e)}"

Notes:

  • Uses SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS to locate users by role membership.
  • Runs EXECUTE AS OWNER so callers don’t need elevated privileges (the owner does).

Run It

Call the procedure to hide the download button for everyone in a role:

CALL <DB>.<SCHEMA>.SET_USER_PARAMETER_FOR_ROLE( 'ANALYST_ROLE', 'DISABLE_UI_DOWNLOAD_BUTTON', 'TRUE' );

Verify

Check a user’s effective setting:

SHOW PARAMETERS LIKE 'DISABLE_UI_DOWNLOAD_BUTTON' FOR USER demo_user_001;
Download Button Enabled Prior to Procedure Call
Download Button Disabled Following Procedure Call

Operational Notes

It may be worthwhile to create a separate Snowflake role outside of any existing RBAC hierarchy specifically for setting the parameter values for users, particularly in situations where this parameter needs set for only a subset of all users. Placing the role outside of any existing hierarchy also helps prevent unintended privilege grants through inheritance.

Additionally, the procedure call could be wrapped in a scheduled task to set or reset the user parameter on the role members on a given cadence, simplifying management to just role membership.

Wrap-Up

This is a simple, repeatable pattern to align Snowsight’s download behavior with your governance standards. Because user-level values take precedence, once a user has DISABLE_UI_DOWNLOAD_BUTTON = TRUE, the button stays hidden regardless of which role they use.

Follow me on LinkedIn and Medium for more data engineering and AI demos on Snowflake, Streamlit, and Python.

Originally published at http://ericheilman.com on August 23, 2025.

Learn more Hiding Download Button in Snowsight: A Step-by-Step Guide

Leave a Reply