Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the collation name of a given column.
For the corresponding Databricks SQL function, see collation function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.collation(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target string column to work on. |
Returns
pyspark.sql.Column: collation name of a given expression.
Examples
df = spark.createDataFrame([('name',)], ['dt'])
df.select(collation('dt').alias('collation')).show(truncate=False)