Step-by-step Snowflake data connection setup
Connecting Snowflake takes about five minutes. Before starting, you'll need your Account Identifier and login credentials, plus a quick check with your Snowflake admin to confirm which authentication method your organization uses. Follow these steps to connect to your Snowflake data and visualize it with Plotly, using Plotly Studio:
Step 1: Locate your account details in Snowflake
Log into your Snowflake instance and navigate to the account menu in the bottom-left corner. Select Connect a tool to Snowflake to find the configuration information you'll need. The most critical piece is your Account Identifier: a unique string in the format [organization]-[account] (e.g., myorg-myaccount). This is distinct from your login URL and does not include the .snowflakecomputing.com suffix.
Step 2: Confirm your authentication method
Plotly Studio connects to Snowflake best using a username and password. Before starting, confirm with your Snowflake admin which authentication method your organization uses:
- Username + Password: the standard flow, covered in this guide
- MFA (Multi-Factor Authentication): requires appending your TOTP code to your password
- Programmatic Access Tokens: a token-based alternative to credentials
- OAuth / SSO: not currently supported directly; use a Programmatic Access Token instead
Step 3: Identify your optional parameters
Snowflake supports several optional connection arguments that may be required depending on your organization's setup:
- Warehouse: the compute resource that runs your queries
- Role: controls data access based on Snowflake's RBAC
- Database: you can specify a starting database
- Schema: optional at connection time
Step 4: Connect in Plotly Studio
Open a new project and select Connect to Snowflake from the data source options. Plotly Studio will generate a credentials form. Enter your Account Identifier, Username, Password, and optionally your Warehouse and Role. Save the credentials — Plotly Studio will test the connection and return a Database Explorer listing all databases, schemas, and tables your role has access to.
Credentials needed
- Account Identifier: your Snowflake org and account name, formatted as [org]-[account] (no .snowflakecomputing.com suffix)
- Username: your Snowflake login name
- Password: your Snowflake password
- Warehouse (optional): the virtual warehouse to use for query execution
- Role (optional): the Snowflake role that governs your data access (e.g., SYSADMIN, ACCOUNTADMIN, or a custom role)
- Database (optional): the default database to connect to
- Schema (optional): the default schema within the database
Tip: contact us if you need help troubleshooting these steps.
LLM prompts for connecting to Snowflake
Plotly Studio uses an AI agent to generate and execute the data connection code for you. The prompts below are ready to copy and paste directly into Plotly Studio's data connection chat. Use these prompts to establish a connection, query your data, or do both in one shot. The global context rules are worth saving to your Plotly Studio global context to keep Snowflake connections consistent across projects.
Connection prompt
Connect to Snowflake using the snowflake-connector-python library. Use
snowflake.connector.connect() with the provided account identifier, username, and password.
Include warehouse and role if provided. Upon successful connection, list all available
databases using SHOW DATABASES, then enumerate schemas and tables within the selected
database.
Query prompt
Using the established Snowflake connection, retrieve data from the table [YOUR_DATABASE].[YOUR_SCHEMA].[YOUR_TABLE].
Execute the query using a cursor and return results as a pandas
DataFrame using cursor.fetch_pandas_all(). Use standard Snowflake SQL syntax. If joining
multiple tables, limit results to [N] rows for an initial preview.
Example one-shot prompt
Connect to Snowflake using snowflake-connector-python with the following credentials:
Account Identifier: [YOUR_ORG]-[YOUR_ACCOUNT]
Username: [YOUR_USERNAME]
Password: [YOUR_PASSWORD]
Warehouse: [YOUR_WAREHOUSE] (optional)
Role: [YOUR_ROLE] (optional)
Database: [YOUR_DATABASE] (optional)
Use snowflake.connector.connect() to establish the connection. Once connected, retrieve all
rows from the table [YOUR_DATABASE].[YOUR_SCHEMA].[YOUR_TABLE] and return the result as a
pandas DataFrame using fetch_pandas_all(). Display a preview of the data.
Global context rules
- Always use snowflake-connector-python as the primary connection library.
- Always connect using snowflake.connector.connect() with an explicit account, user, and password. Include warehouse and role when provided.
- The account parameter must use the format [org]-[account] and must NOT include the .snowflakecomputing.com suffix. Replace any underscores in the account identifier with dashes.
- Always return query results as a pandas DataFrame using cursor.fetch_pandas_all() for efficiency with large datasets.
- Always use fully qualified table names in the format DATABASE.SCHEMA.TABLE to avoid ambiguity.
- Use standard Snowflake SQL syntax. Do not use MySQL, T-SQL, or PostgreSQL dialects.
- If the table structure is unknown, run SHOW TABLES IN SCHEMA [DATABASE].[SCHEMA] and then DESCRIBE TABLE [table] to inspect column names and types before building the main query.
- When joining tables, default to limiting results to 1000 rows for initial previews unless the user requests a full pull.
- Always close the cursor and connection after data retrieval using cursor.close() and conn.close().
- Do not log or expose raw password or token values in any output or error messages.
Troubleshooting and tips
- Account identifiers: Underscores are not supported in the account parameter. If your account identifier includes underscores, replace them with dashes before entering it into Plotly Studio.
- MFA: If your account requires MFA, you have two options: (1) append your TOTP passcode directly to your password at login time (e.g., mypassword123456), or (2) ask Plotly Studio's agent to add a separate MFA passcode field to the credentials form.
- Programmatic Access Tokens: If your organization uses OAuth/SSO and individual username/password auth is not available, ask your admin to generate a Programmatic Access Token for your user. This token can be used in place of a password and is the recommended approach for app sharing and production deployments.
- Warehouses and compute costs: Snowflake charges for compute time when a warehouse is active and running queries. Make sure a warehouse is available and appropriately sized for your query volume before connecting. If you get a timeout or "warehouse suspended" error, the warehouse may need to be resumed in the Snowflake UI.
- Role-based access: If you connect and find that databases or tables are missing, it's likely a role permissions issue. Switch to a role with broader access (e.g., SYSADMIN) or ask your admin to grant the appropriate privileges to your user's current role.
- Exploring unfamiliar schemas: Plotly Studio's AI can help you navigate schemas you don't know well. Ask open-ended questions like "show me the tables related to customers" and it will explore the schema and propose relevant joins — no need to know the exact table names upfront.
- After connecting: Once your data is loaded, use Explore Mode for automatic chart suggestions, App Prototyping to generate a six-chart dashboard in one shot, or the Spec Builder to create individual components. You can also paste complex SQL views or JOIN queries directly into the chat to load pre-built data shapes into Plotly Studio
Connect to Snowflake in minutes with Plotly Studio
Download today for free and get started with Plotly Studio.
