You are viewing documentation about an older version (1.12.1). View latest version

snowflake.snowpark.functions.collate¶

snowflake.snowpark.functions.collate(e: Column, collation_spec: str) → Column[source]¶

Returns a copy of the original Column with the specified collation_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                                  |
----------------------------------------------------------
Copy