Shimoku docs
Search…
Snowflake
As a better alternative than Streamlit, we suggest using Shimoku for visual data sharing with Snowflake. One can create a Data App directly from Snowflake with Pandas, Snowflake and Shimoku in barely 30 lines of code:
from os import getenv
import pandas as pd
from sqlalchemy import create_engine
from snowflake.sqlalchemy import URL
import shimoku_api_python as Shimoku
url = URL(
account = 'xxxx',
user = 'xxxx',
password = 'xxxx',
database = 'xxx',
schema = 'xxxx',
warehouse = 'xxx',
role='xxxxx',
authenticator='https://xxxxx.okta.com',
)
engine = create_engine(url)
connection = engine.connect()
query = 'select * from MYDB.MYSCHEMA.MYTABLE LIMIT 10;'
df = pd.read_sql(query, connection)
shimoku = Shimoku.Client(
config={'access_token': getenv('SHIMOKU_TOKEN')},
universe_id=getenv('UNIVERSE_ID'),
)
# Load data to Shimoku
shimoku.plt.line(
data=df, x='status', y=['total'],
menu_path='Cube',
)
Last modified 3mo ago
Copy link