{"id":973,"date":"2024-11-20T09:21:38","date_gmt":"2024-11-20T16:21:38","guid":{"rendered":"http:\/\/sqldbpros.com\/wordpress\/?p=973"},"modified":"2024-11-20T09:21:38","modified_gmt":"2024-11-20T16:21:38","slug":"checking-snowflake-cortex_enabled_cross_region-aka-cross-reference-inference","status":"publish","type":"post","link":"http:\/\/sqldbpros.com\/wordpress\/2024\/11\/checking-snowflake-cortex_enabled_cross_region-aka-cross-reference-inference\/","title":{"rendered":"Checking Snowflake CORTEX_ENABLED_CROSS_REGION (aka Cross Reference Inference)"},"content":{"rendered":"\n<p>Not sure why this was such a struggle to find! I knew I had turned on cross region inference in our snowflake account and I was 51% sure I had set it to only allow US regions but I could not figure out how to check. Google, google, google, nothing. I tried SHOW CORTEX_ENABLED_CROSS_REGION and thought I had it with that one but: \"Object type or Class 'CORTEX_ENABLED_CROSS_REGION' does not exist or not authorized. I confirmed I was using the ACCOUNTADMIN role but still no luck.<\/p>\n\n\n\n<p>It seemed like every page I found on the topic led me back to: <\/p>\n\n\n\n<p>Snowflake's general documentation for <a href=\"https:\/\/docs.snowflake.com\/en\/user-guide\/snowflake-cortex\/cross-region-inference\">Cross-region inference<\/a> and the command to turn on cross region inference:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'AWS_US';<\/pre>\n\n\n\n<p>Finally, a clue on <a href=\"https:\/\/docs.snowflake.com\/en\/sql-reference\/parameters#label-cortex-enable-cross-region\">Snowflake Documentation Reference &gt; General Reference &gt; Parameters<\/a> When I scrolled to the top of the page and saw this was about setting parameters... I started googling for something like SHOW PARAMETERS.<\/p>\n\n\n\n<p>Victory!<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.snowflake.com\/en\/user-guide\/admin-account-management\">Snowflake Docs Guides &gt; Organizations &amp; Accounts &gt; Parameter Management<\/a><\/p>\n\n\n\n<p>I tried SHOW PARAMETERS first and thought I may have reached another dead end, but SHOW PARAMETERS by itself defaults to SESSION.<\/p>\n\n\n\n<p>Next step:<\/p>\n\n\n\n<p>SHOW PARAMETERS IN ACCOUNT, which actually works but in my case brought back 190 rows and in skimming through the results I missed CORTEX_ENABLED_CROSS_REGION.<\/p>\n\n\n\n<p>Then the secret sauce:<\/p>\n\n\n\n<p>show parameters like '%CORTEX%' in account<\/p>\n\n\n\n<p>This brought back:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>key<\/strong><\/td><td><strong>value<\/strong><\/td><td><strong>default<\/strong><\/td><td><strong>level<\/strong><\/td><td><strong>description<\/strong><\/td><td><strong>type<\/strong><\/td><\/tr><tr><td>CORTEX_ENABLED_CROSS_REGION<\/td><td>AWS_US<\/td><td>DISABLED<\/td><td>ACCOUNT<\/td><td>Comma seperated list of allowed cortex cross regions. Order does not matter.<\/td><td>STRING<\/td><\/tr><tr><td>ENABLE_CORTEX_ANALYST<\/td><td>false<\/td><td>false<\/td><td>SYSTEM<\/td><td>Is the Cortex Analysty REST API enabled.<\/td><td>BOOLEAN<\/td><\/tr><tr><td>ENABLE_CORTEX_ANALYST_MODEL_AZURE_OPENAI<\/td><td>false<\/td><td>false<\/td><td><\/td><td>Whether to allow models from Azure OpenAI (e.g. GPT-4) when serving Cortex Analyst API requests or to only use Snowflake-hosted models.<\/td><td>BOOLEAN<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>YES! The riddle is solved! I successfully confirmed I remembered what I did \ud83d\ude09<\/p>\n\n\n\n<p>Also, while the documentation to get this information left something to be desired I do love that the description of the parameter as well as the default value is included in the output. Love that. Also, ENABLE_CORTEX_ANALYST_MODEL_AZURE_OPENAI ? I think I need to investigate that one!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not sure why this was such a struggle to find! I knew I had turned on cross region inference in our snowflake account and I was 51% sure I had set it to only allow US regions but I could not figure out how to check. Google, google, google, nothing. I tried SHOW CORTEX_ENABLED_CROSS_REGION and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":976,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[199],"class_list":["post-973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-snowflake"],"_links":{"self":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/comments?post=973"}],"version-history":[{"count":2,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/973\/revisions"}],"predecessor-version":[{"id":977,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/973\/revisions\/977"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/media\/976"}],"wp:attachment":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/media?parent=973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/categories?post=973"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/tags?post=973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}