Building an Interactive Data App with Snowflake & Streamlit
A presentation at Snowflake BUILD.local Amsterdam in November 2022 in Amsterdam, Netherlands by Daan Bakboord
Building an Interactive Data App with Snowflake & Streamlit
© 2022 Snowflake Inc. All Rights Reserved
Agenda Introduction into Streamlit Demo Wrapping Up Questions
“a Python library that allows the creation of interactive, data-driven web applications in Python” © 2022 Snowflake Inc. All Rights Reserved
BUILDKey 2022 GLOBALLY Takeaways TITLE HERE IN ALL CAPS Streamlit brings your data to life Today Snowflake customers can get started with the Streamlit Open Source Library Coming soon Snowlake integration to build, deploy, and share Streamlit apps in Snowflake “Build interactive apps with Python” © 2022 Snowflake Inc. All Rights Reserved
Streamlit is a new way of creating apps • Directly from Data and Python code. • Right from your favorite IDE. • Create a Data App in minutes • All Data Types because it’s Python 🐍 “The best and latest from Data Science and Machine Learning” © 2022 Snowflake Inc. All Rights Reserved
BUILD 2022isGLOBALLY Streamlit built by and for TITLE HERE IN ALL CAPS data practitioners Doing Data Science Coding in Python Looking for speed! Data scientists, ML engineers, data engineers, and others w/ Python knowledge love Streamlit If they are in the Snowpark preview for Python that’s a good signal! Create an app in minutes. No frontend experience necessary. © 2022 Snowflake Inc. All Rights Reserved 7
Common use cases for Streamlit Rapid prototyping Demo-ing work Creating tools for business users Data science teams quickly build data apps in Python to test hypotheses, gather feedback, and iterate quickly to deliver insights to their business stakeholders. Data scientists use Streamlit as a direct method of sharing data with clients, customers, partners, and even suppliers to reduce lag and drive positive business outcomes. Often this starts as just a demo of capabilities but then turns into deliverables for customers and partners. Data teams struggle to share the outputs of their models in an easily consumable way for their stakeholders. Folks from sales, operations, marketing, and support can often benefit from interacting with models the data team has built. Streamlit creates a fast and easy way to create new tools from data that empower business users. © 2022 Snowflake Inc. All Rights Reserved
BUILD 2022 Today: UseGLOBALLY Streamlit open source TITLE HERE IN library ALL CAPS to bring data to life How it works: Why it matters ● Install open source Python library 🐍 Only need Python to build an app ● Connect to data in Snowflake via Python connector ⏩ Explore your data and accelerate model development ● Build and edit locally 📊 Share your insights in a way everyone will understand ● Deploy and share on your own © 2022 Snowflake Inc. All Rights Reserved
DEMO TIME
Demo Time! https://bit.ly/DaAnalytics_BUILD_local Doing the Streamlit-magic • • • • • • © 2022 Snowflake Inc. All Rights Reserved Streamlit getting started Building a first Streamlit App Building a first Streamlit App on Snowflake Deploying a Streamlit App on the Streamlit Cloud Snowflake and Marketplace Data in Streamlit Snowflake Snowpark and Marketplace Data in Streamlit
Get Started in under a minute! © 2022 Snowflake Inc. All Rights Reserved
Building a first Streamlit App © 2022 Snowflake Inc. All Rights Reserved
Building a first Streamlit App on Snowflake • Setting up the connection to Snowflake o Install Snowflake for Python Connector o Validate Snowflake connection • Creating Snowflake-objects • Loading Data • Doing the Streamlit-magic © 2022 Snowflake Inc. All Rights Reserved
Deploying a Streamlit App on the Streamlit Cloud GitHub Account Select Python-file from GitHubRepository Advanced Settings Python version 3.8 Credentials Deploy App © 2022 Snowflake Inc. All Rights Reserved Deploy, manage, and share your apps with the world, directly from Streamlit — all for free.
Snowflake Marketplace Data in Streamlit • • • • • © 2022 Snowflake Inc. All Rights Reserved Importing Libraries Connection to Snowflake Creating Data Sets (SQL) Formatting Streamlit App Doing the Streamlit-magic
Snowflake Snowpark & Marketplace Data in Streamlit • • • • • © 2022 Snowflake Inc. All Rights Reserved Importing Libraries Connection to Snowflake Creating Data Sets (Python) Formatting Streamlit App Doing the Streamlit-magic
WRAPPING UP
Personal use cases for Streamlit Open Source Data Visualization Visualizing Snowflake Demo-ing & Prototyping Data Visualization for an Independent Consultant. No need to buy licences What happens inside Snowflake? Quickly building and showing apps and iterating. © 2022 Snowflake Inc. All Rights Reserved Visualizing rankings of our own Pong game.
BUILD 2022 GLOBALLY In Dev: Build, deploy, and share TITLE HERE IN ALL CAPSin Snowflake Streamlits How it will work: Why it matters: ● Build in Snowflake Python worksheet ⏩ Streamline dev by building in Snowflake ● Deploy from Snowflake 🧰 Deploy and run apps that leverage Snowflake infrastructure ● Share with Snowflake users ● Monetize using Native App Framework 🔒 Securely collaborate, iterate, and monetize With Snowflake’s Streamlit integration © 2022 Snowflake Inc. All Rights Reserved
Streamlit Resources Forums https://discuss.streamlit.io https://discord.gg/bTz5EDYh9Z Tutorials Documentation Gallery Third-Party Components https://streamlit.io © 2022 Snowflake Inc. All Rights Reserved • • https://streamlitpython.com https://30days.streamlit.app
DaAnalytics Build.local GitHub Code https://bit.ly/DaAnalytics_BUILD_local © 2022 Snowflake Inc. All Rights Reserved
Snowflake Data Superheroes DATA CLOUD ENTHUSIASTS, EXPERTS, & ADVOCATES https://community.snowflake.com/s/dataheroes Rewards & Benefits • Product Access • Training • Swag • VIP Experience Obligations • Content Creation • Lead Discussions • Supporting Others • Snowflake Expertise © 2022 Snowflake Inc. All Rights Reserved
QUESTIONS? © 2022 Snowflake Inc. All Rights Reserved
THANK YOU © 2022 Snowflake Inc. All Rights Reserved