Coortex, Cortex, Cortex… all you hear about is Cortex, and we want to give you plenty of opportunity to use all the new Cortex functions here at FROSTY_FRIDAY()
And of course this is a basic challenge because… well, the point of Cortex is to make data science very, very easy!
This week, we’ll be using the translate function. Below is your start up code:
CREATE OR REPLACE TABLE WEEK_87 AS
SELECT
'Happy Easter' AS greeting,
ARRAY_CONSTRUCT('DE', 'FR', 'IT', 'ES', 'PL', 'RO', 'JA', 'KO', 'PT') AS language_codes
;
Your end result should look like the below:
Good luck!
emanueol says
Need help with error “Unknown user-defined function SNOWFLAKE.CORTEX.TRANSLATE” ?
use role accountadmin;
grant database role snowflake.cortex_user to role sysadmin;
show grants to role sysadmin;
select current_role();
–SYSADMIN
SELECT SNOWFLAKE.CORTEX.TRANSLATE(‘review_content’, ‘en’, ‘de’);
Unknown user-defined function SNOWFLAKE.CORTEX.TRANSLATE
mandarha says
Please check your cloud provider + region. Translate is available only in below 5 regions.
AWS US East
(N. Virginia)
AWS US West
(Oregon)
AWS Europe
(Frankfurt)
Azure East US 2
(Virginia)
Azure West Europe
(Netherlands)
emanueol says
Thanks do much, yes i see, wasn’t aware and was driving my crazy
https://docs.snowflake.com/en/user-guide/snowflake-cortex/llm-functions#availability
mandarha says
Attempted after quite long time 🙂
select X.value::varchar,SNOWFLAKE.CORTEX.TRANSLATE(T.greeting,’en’,X.value::varchar) from
week_87 T,
LATERAL FLATTEN(T.language_codes) X;
mferle says
Cool, it’s so easy to use LLM functionality.
Jamie Laird says
I had no idea this existed – very cool indeed!
darko says
https://github.com/darko-nimbus/FROSTYFRIDAYCHALLENGES/blob/main/Week87.sql
darko says
Whoops, I confused the two reply boxes…
ChrisHastie says
Thanks for continuing to showcase useful new functionality. Happy Easter!
sakatoku says
This is a simple challenge, but a very important step! I love it.
これはシンプルなチャレンジだけど、とても重要な一歩だね!気に入りました。