AI_TRANSLATE

Translate text into a target language via a registered chat model.

Category: aiReturns: STRINGDialect: DeltaForgeDeltaForge extension

Syntax

AI_TRANSLATE(model_name, text, target_language)
AI_TRANSLATE(text USE MODEL model_name, target_language)

Description

## Overview Task sugar over AI_GENERATE: instructs the model to respond with only the translation into the target language, composed after the model's SYSTEM_PROMPT. Shares AI_GENERATE's batching, dedup, response memo, and error semantics. The USE MODEL sugar form is accepted and rewritten to the leading-model-argument form.

Parameters

NameTypeDescription
model_nameThe registry name of a MODEL_TYPE = CHAT model. Must be constant within a query.
textThe text to translate. NULL produces NULL without calling the provider.
target_languageThe target language as a human-readable name or code (e.g. 'Norwegian', 'de'). Must be a constant.

Examples

SELECT id, AI_TRANSLATE('gpt5', description, 'Norwegian') AS description_no
FROM catalog.silver.products;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →