snowflake-cloud-data-platformstreamlitsnowflake-schema

Alternative to st.file_uploader Snowflake Streamlit


I'm working on developing an app using Streamlit where users can upload a CSV file and insert it into a table or display its contents . I've attempted to use st.file_uploader, but it seems to be disabled. In my use case, users should have the option to upload a CSV file either from their local machine or from my S3 bucket. Could you please provide alternative approaches to implement this functionality?

Thanks


Solution

  • To be precise, the Streamlit file_uploader control works correctly in applications outside Snowflake. For now it is blocked in Streamlit in Snowflake (SiS) for security reasons, in the future Snowflake should enable it (I'm also waiting very much for that).

    You can find the full list of limitations in SiS here: Unsupported Streamlit in Snowflake features

    At the moment there are two possibilities:

    1. Using Streamlit outside Snowflake.
    2. Allowing users to upload files to the S3 bucket (e.g., using AWS Explorer) and in the SiS application reading the file from this external stage, instead of uploading it via the file_uploader control.