FORMAT_STRING_TEMPLATE

functionsupportedCore SQL functions

docs.snowflake.com ↗

String & binary functions

Formats a string by substituting placeholders with values, providing type-aware string interpolation. This function enables templated string construction with typed formatting specifications, similar to formatted string literals in other programming languages.

Syntax

FORMAT_STRING_TEMPLATE( <template_string> , <value1> [ , <value2> ... ] )

Parameters

NameRequiredDescription
template_stringrequiredA string containing placeholders that are replaced with formatted values. Placeholders use curly braces {} with optional format specifications.
value1 [ , value2 ... ]requiredOne or more values to substitute into the template string. Values are matched to placeholders in order. The function supports full type handling for numeric, string, date, and other Snowflake data types.

Returns

Returns a VARCHAR containing the formatted string with all placeholders replaced by the corresponding values.

Usage notes

See also