Redirected from st.dataframe column to another page in a multi-page app in Snowflake

I have one page containing a st.dataframe, where users clicks a link in a column, and redirected to another page in a multi-page app. It is working in my local machine. However, it doesn’t work in Snowflake due to the lack of support for st.query_params.

Is there another solution for this?

First page that redirects users to the second page

    parent_df["update"]= parent_df.apply(lambda row: 
            f"/Updates?db={row['db']}",
            axis=1)            
        parent_table = st.dataframe(
            parent_df,
            column_config={       
                    "database":"Database",
                    "masking_update": st.column_config.LinkColumn("Update", 
                      display_text="Update")
                    },
            hide_index= True,
            use_container_width = False,
            width=500,
            on_select='rerun',
            selection_mode=["multi-row"]
            )

Second page:


if "db" in st.query_params:
	db_selected_qp = st.query_params["db"]
1 Like

i am also trying a similar thing on my local machine. But on reaching the second page i am getting issue in accessing session_state. Gettgin the below error message .

Query parameters are handled differently in SiS. You will need to make sure that the link sending your users to the SiS app has the correct form of query parameter in the URL. The link needs ?streamlit-db=... in the URL for the second app to see “db” in the query parameters.