How to list every Streamlit app in a Snowflake account, and who uses it
Over time an account collects Streamlit apps, built in Snowsight by different people for questions that may no longer matter. Two queries tell you what is there and who still opens it.
Every app
SHOW STREAMLITS IN ACCOUNT lists the apps your role can see, with owner and warehouse:
SHOW STREAMLITS IN ACCOUNT;
SELECT "database_name" || '.' || "schema_name" || '.' || "name" AS app,
"title", "owner", "query_warehouse", "created_on"
FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))
ORDER BY "created_on";
Who uses each one
A Streamlit app runs its queries as the person viewing it, with the app’s name in the query tag. Count them per app and person over the last 30 days:
SELECT UPPER(REPLACE(TRY_PARSE_JSON(query_tag):StreamlitName::string, '"', '')) AS app,
user_name AS viewer,
COUNT(*) AS queries,
MAX(start_time) AS last_used
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE start_time > DATEADD(day, -30, CURRENT_TIMESTAMP())
AND query_tag LIKE '%"StreamlitName"%'
GROUP BY 1, 2
ORDER BY app, queries DESC;
An app from the first list that never shows up here has not been opened in 30 days. Your role needs the
SNOWFLAKE.GOVERNANCE_VIEWER database role for QUERY_HISTORY; the view runs minutes behind.
Keep it as a daily inventory
StreamGen keeps this list for you inside your account: every Streamlit and App Runtime app, built in StreamGen or not, with owner, last deploy, last use, viewers in the last 30 days and credits. Apps nobody opened for 60 days are flagged with what it takes to retire them, and apps people built by hand can be brought in with one click.
It is a Snowflake Native App on the Snowflake Marketplace, with a free 7-day trial key.