PyGWalkre & Snowflake API
Install pygwalker and pygwalker snowflake plugin。
pip install --upgrade --pre pygwalker
pip install --upgrade --pre "pygwalker[snowflake]"
Create a connector to snowflake and pass it to pyg.walk
function.
import pygwalker as pyg
from pygwalker.data_parsers.database_parser import Connector
conn = Connector(
"snowflake://user_name:password@account_identifier/database/schema",
"""
SELECT
*
FROM
SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
"""
)
walker = pyg.walk(conn)
The first argument to the Connector
is the connection string format in sqlalchemy. According to snowflake's documentation (opens in a new tab), the connection string format is as follows:
- Account name:
snowflake://<user_login_name>:<password>@<orgname>-<account_name>
- Account locator:
snowflake://<user_login_name>:<password>@<account_locator>.<region_id>.<cloud>
Related Q&A
How to build a interactive data visualization app that can handle large dataset?
Using pygwalker + snowflake.
If there a visual interface for explore data in snowflake?
Yes, pygwalker (opens in a new tab) is a visual interface for explore data that can easier connect to snowflake. You can start to explore with a few lines of code.
How to use pygwalker to handle large dataset?
pygwalker (opens in a new tab) supports to connect external data service, like snowflake and bigquery.