Building an Interactive Data App with Snowflake & Streamlit

A presentation at Snowflake BUILD.local Amsterdam in November 2022 in Amsterdam, Netherlands by Daan Bakboord

Slide 1

Slide 1

Building an Interactive Data App with Snowflake & Streamlit

Slide 2

Slide 2

© 2022 Snowflake Inc. All Rights Reserved

Slide 3

Slide 3

Agenda Introduction into Streamlit Demo Wrapping Up Questions

Slide 4

Slide 4

“a Python library that allows the creation of interactive, data-driven web applications in Python” © 2022 Snowflake Inc. All Rights Reserved

Slide 5

Slide 5

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

Slide 6

Slide 6

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

Slide 7

Slide 7

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

Slide 8

Slide 8

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

Slide 9

Slide 9

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

Slide 10

Slide 10

DEMO TIME

Slide 11

Slide 11

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

Slide 12

Slide 12

Get Started in under a minute! © 2022 Snowflake Inc. All Rights Reserved

Slide 13

Slide 13

Building a first Streamlit App © 2022 Snowflake Inc. All Rights Reserved

Slide 14

Slide 14

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

Slide 15

Slide 15

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.

Slide 16

Slide 16

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

Slide 17

Slide 17

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

Slide 18

Slide 18

WRAPPING UP

Slide 19

Slide 19

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.

Slide 20

Slide 20

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

Slide 21

Slide 21

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

Slide 22

Slide 22

DaAnalytics Build.local GitHub Code https://bit.ly/DaAnalytics_BUILD_local © 2022 Snowflake Inc. All Rights Reserved

Slide 23

Slide 23

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

Slide 24

Slide 24

QUESTIONS? © 2022 Snowflake Inc. All Rights Reserved

Slide 25

Slide 25

THANK YOU © 2022 Snowflake Inc. All Rights Reserved