Checking Snowflake CORTEX_ENABLED_CROSS_REGION (aka Cross Reference Inference)


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.

It seemed like every page I found on the topic led me back to:

Snowflake’s general documentation for Cross-region inference and the command to turn on cross region inference:

ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'AWS_US';

Finally, a clue on Snowflake Documentation Reference > General Reference > Parameters When I scrolled to the top of the page and saw this was about setting parameters… I started googling for something like SHOW PARAMETERS.

Victory!

Snowflake Docs Guides > Organizations & Accounts > Parameter Management

I tried SHOW PARAMETERS first and thought I may have reached another dead end, but SHOW PARAMETERS by itself defaults to SESSION.

Next step:

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.

Then the secret sauce:

show parameters like ‘%CORTEX%’ in account

This brought back:

keyvaluedefaultleveldescriptiontype
CORTEX_ENABLED_CROSS_REGIONAWS_USDISABLEDACCOUNTComma seperated list of allowed cortex cross regions. Order does not matter.STRING
ENABLE_CORTEX_ANALYSTfalsefalseSYSTEMIs the Cortex Analysty REST API enabled.BOOLEAN
ENABLE_CORTEX_ANALYST_MODEL_AZURE_OPENAIfalsefalseWhether to allow models from Azure OpenAI (e.g. GPT-4) when serving Cortex Analyst API requests or to only use Snowflake-hosted models.BOOLEAN

YES! The riddle is solved! I successfully confirmed I remembered what I did 😉

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!


Leave a Reply

Your email address will not be published. Required fields are marked *