Streamlit Hierarchical Data Viewer in Snowflake
When I described How to Easily Visualize Hierarchical Tabular Data, Streamlit Apps in Snowflake was not in Public Preview, as it is now. My demo was on a CSV file, but here is a more evolved open-source version that installs my code as a Streamlit App in your Snowflake account, and generates graphs on hierarchical data returned in a query result.
Read here the post for free if you do not have a Medium subscription.
The SQL Query
When you run the app, a default SQL query will automatically run on an Employee sample table, installed in the same schema with the application:
You must now select returned column names in the left sidebar, and switch to the Graph tab, to see the generated charts.
The query will not change and execute again, until you change the statement (you may query your own data, from anywhere in the Snowflake account!) and click Run. We decorated that function with the st.cache_resource
Streamlit…