VECTOR_TRUNCATE

functionpartialAI & ML

docs.snowflake.com ↗

Vector functions

Truncates a VECTOR to a smaller dimension. This function can also be called through the alias VECTOR_TRUNC.

Syntax

VECTOR_TRUNCATE( <vector>, <dimension> )

Parameters

NameRequiredDescription
vectorrequiredA single VECTOR value to truncate.
dimensionrequiredThe number of elements that should be in the returned vector.

Returns

Returns a VECTOR value with the same values and types for the first dimension entries, with the remainder discarded.

Usage notes

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.

See also

Referenced by