snowflake.snowpark.functions.collate¶
- snowflake.snowpark.functions.collate(e: Column, collation_spec: str) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L2816-L2834)¶
Returns a copy of the original
Column
with the specifiedcollation_spec
property, rather than the original collation specification property.For details, see the Snowflake documentation on collation specifications.
- Example::
>>> df = session.create_dataframe(['ñ'], schema=['v']) >>> df.select(df.v == lit('Ñ'), collate(df.v, 'sp-upper') == lit('Ñ')).show() ---------------------------------------------------------- |"(""V"" = 'Ñ')" |"(COLLATE(""V"", 'SP-UPPER') = 'Ñ')" | ---------------------------------------------------------- |False |True | ----------------------------------------------------------