Snowflake connectivity in streamlit-cloud has some bug

Summary

I followed the tutorial for snowflake connectivity in the cloud and always ran into issue. I then tried the code in colab and it worked. Finally, I tried the code in local mac and it worked too. Wonder what is going on in the cloud version.

Steps to reproduce

Code snippet:

import streamlit as st

# Initialize connection.
conn = st.experimental_connection('snowpark')

@st.cache_data
def load_table():
    with conn.safe_session() as session:
        return session.table('customers').to_pandas()

# Perform query.
df = load_table()

# Print results.
df

secrets.toml

# .streamlit/secrets.toml

[connections.snowpark]
account = "xcb6683.us-east-1"
user = "SNOWRAKE"
password = ""
role = "ACCOUNTADMIN"
warehouse = "COMPUTE_WH"
database = "RAW"
schema = "JAFFLE_SHOP"
client_session_keep_alive = true

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If youโ€™re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.

Links

  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Thank you, @rakstream, for reporting this.

It may indeed be a bug or an issue that we might be able to solve.

Without the specific error message, itโ€™s a bit challenging to pinpoint the exact issue. Could you please send us the error log trace, along with some snippets of your code?

Best,
Charly

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.