SOL-C01 · Question #198
SOL-C01 Question #198: Real Exam Question with Answer & Explanation
The correct answer is E: CREATE OR REPLACE VIEW PRODUCTS_FR AS SELECT PRODUCT_ID,. The most efficient and correct way is option E. It correctly uses the `SNOWFLAKE.CORTEX.TRANSLATE' function with named parameters for clarity and explicitly specifies the source and target languages. Options A and B uses incorrect library and function call and doesn't specify nam
Question
A data engineer needs to translate product names stored in a 'PRODUCTS' table from English to French using Snowflake Cortex LLM. The 'PRODUCTS' table has a 'PRODUCT ID' and 'PRODUCT NAME EN' column. They want to create a view named 'PRODUCTS FR' that contains the translated product names in a new column called 'PRODUCT NAME FR. Which of the following SQL statements is the MOST efficient and correct way to create the view using the 'TRANSLATE' function, assuming the appropriate LLM endpoint is configured?
Options
- ACREATE VIEW PRODUCTS_FR AS SELECT PRODUCT_ID, 'en', 'fr') AS FROM PRODUCTS;
- BCREATE OR REPLACE VIEW PRODUCTS FRAS SELECT PRODUCT ID, 'en', 'fr') AS FROM
- CCREATE OR REPLACE VIEW PRODUCTS_FR AS SELECT PRODUCT_ID, NAME EN) AS
- DCREATE OR REPLACE VIEW PRODUCTS_FR AS SELECT PRODUCT_ID, PRODUCT NAME
- ECREATE OR REPLACE VIEW PRODUCTS_FR AS SELECT PRODUCT_ID,
Explanation
The most efficient and correct way is option E. It correctly uses the `SNOWFLAKE.CORTEX.TRANSLATE' function with named parameters for clarity and explicitly specifies the source and target languages. Options A and B uses incorrect library and function call and doesn't specify named parameters. option C uses SNOWFLAKE.ML.PREDICT which expects a ML model, not TRANSLATE function
Topics
Community Discussion
No community discussion yet for this question.