You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to follow your example to set up Cortex Analyst on a streamlit app and was initially able to get results but after Nov 12, I'm getting a new error. "Unauthorized to call Cortex Analyst"
My app is being deployed in development mode to snowflake.
From reading the code in this repo, I'm under the impression that the code above should include authentication under the hood, else the examples here wouldn't work.
Additionally, I went ahead and attempted to fetch from the api outside of snowflake / streamlit by using the following code:
where host is the https://{account_identifier}.snowflakecomputing.com
and I got a successful response.
I attempted to pass in the same headers to the _snowflake.send_snow_api_request but kept getting the same Unauthorized to call Cortex Analyst response.
Please let me know a good way to interact with the Cortex Analyst api within Snowflake / Streamlit.
Mauricio
The text was updated successfully, but these errors were encountered:
I did ensure I added the right permissions, below are the sql queries I ran to create a role and grant required permissions:
CREATE OR REPLACE ROLE CORTEX_ANALYST;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE CORTEX_ANALYST;
GRANT USAGE ON WAREHOUSE wh-name TO ROLE CORTEX_ANALYST;
GRANT ROLE CORTEX_ANALYST TO USER user-role;
Then switched over to said role, and attempted to use Cortex Analyst via the API and get the same error.
notice the bottom left of the screen:
still seeing the same error:
I'm not entirely sure why I might be seeing this. This started happening yesterday which coincidentally matches with the date when cortex analyst stopped being "free".
Hi all,
I'm trying to follow your example to set up Cortex Analyst on a streamlit app and was initially able to get results but after Nov 12, I'm getting a new error. "Unauthorized to call Cortex Analyst"
this is what it looked like before:
I'm using the code from
sfguide-getting-started-with-cortex-analyst/cortex_analyst_sis_demo_app.py
Line 150 in 4faa4cc
My app is being deployed in development mode to snowflake.
From reading the code in this repo, I'm under the impression that the code above should include authentication under the hood, else the examples here wouldn't work.
Additionally, I went ahead and attempted to fetch from the api outside of snowflake / streamlit by using the following code:
where host is the https://{account_identifier}.snowflakecomputing.com
and I got a successful response.
I attempted to pass in the same headers to the
_snowflake.send_snow_api_request
but kept getting the sameUnauthorized to call Cortex Analyst
response.Please let me know a good way to interact with the Cortex Analyst api within Snowflake / Streamlit.
Mauricio
The text was updated successfully, but these errors were encountered: