trim

org.apache.spark.sql.functions.trim => com.snowflake.snowpark.functions.trim

trim transformation has two cases, the first when trim has only one argument is necessary to add lit("") as second argument; the other consists on cast the second argument from string to column.

Input Code:

val result1 = trim(clmn)
val result2 = trim(clmn, ".")

Output Code:

val result1 = trim(clmn, lit(""))
val result2 = trim(clmn, lit("."))

Last updated