SOL-C01 practice question 11 of 30

When using the TRANSLATE function, what type of input is expected for the source and target languages?

Full set: 214 questions
Answer options
A: Full language names (e.g., "English", "French")
B: Standard language codes (e.g., "en", "fr") Correct answer
C: File paths to language dictionaries
D: Numerical language identifiers
Correct Answer:
B. Standard language codes (e.g., "en", "fr")
Explanation

The Snowflake Cortex TRANSLATE function requires the source and target languages to be specified using their two-letter ISO 639-1 language codes. For example, 'en' is used for English, 'fr' for French, and 'de' for German. Using these standardized codes ensures unambiguous interpretation by the function and aligns with common practices in language processing services.

Why Incorrect

A. Full language names (e.g., "English", "French"): The function does not accept full language names as arguments; it requires the standardized two-letter codes.
C. File paths to language dictionaries: The function uses a pre-trained model and does not require users to provide external dictionary files.
D. Numerical language identifiers: The function's syntax is defined to use string-based ISO codes, not numerical identifiers, for specifying languages.

References

1. Snowflake Documentation. (n.d.). TRANSLATE. Snowflake Inc. Retrieved from https://docs.snowflake.com/en/sql-reference/functions/translatetext. "The TRANSLATE function translates text from a source language to a target language... sourcelanguage The two-letter ISO 639-1 code of the language of the input text."

Scroll to Top