diff --git a/examples/connect/databricks/README.md b/examples/connect/streamlit/README.md similarity index 100% rename from examples/connect/databricks/README.md rename to examples/connect/streamlit/README.md diff --git a/examples/connect/databricks/requirements.txt b/examples/connect/streamlit/requirements.txt similarity index 90% rename from examples/connect/databricks/requirements.txt rename to examples/connect/streamlit/requirements.txt index 99719b8d..53d0cc3b 100644 --- a/examples/connect/databricks/requirements.txt +++ b/examples/connect/streamlit/requirements.txt @@ -26,7 +26,7 @@ openpyxl==3.1.2 packaging==23.2 pandas==2.1.4 pillow==10.2.0 -posit-sdk @ git+https://github.com/posit-dev/posit-sdk-py.git@24ad71458de56b01b8168e80441ea860236f1933 +posit-sdk @ git+https://github.com/posit-dev/posit-sdk-py.git@cec7f78a1bdee9e5fd7580011bfa0bcef58cd64b protobuf==4.25.3 pyarrow==14.0.2 pyasn1==0.5.1 diff --git a/examples/connect/databricks/sample-content.py b/examples/connect/streamlit/sample-content.py similarity index 90% rename from examples/connect/databricks/sample-content.py rename to examples/connect/streamlit/sample-content.py index 085d235f..f30cac64 100644 --- a/examples/connect/databricks/sample-content.py +++ b/examples/connect/streamlit/sample-content.py @@ -23,7 +23,7 @@ # Read the viewer's user session token from the streamlit ws header. headers = _get_websocket_headers() if headers: - USER_SESSION_TOKEN = headers.get("Posit-Connect-User-Session") + USER_SESSION_TOKEN = headers.get("Posit-Connect-User-Session-Token") credentials_provider = viewer_credentials_provider( user_session_token=USER_SESSION_TOKEN @@ -42,6 +42,6 @@ credentials_provider=credentials_provider, ) as connection: with connection.cursor() as cursor: - cursor.execute("SELECT * FROM data") + cursor.execute("SELECT * FROM samples.nyctaxi.trips") result = cursor.fetchall() st.table(pd.DataFrame(result))