Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Returns the input value if it corresponds to a valid UTF-8 string, or emits an error otherwise.
For the corresponding Databricks SQL function, see validate_utf8 function.
Syntax
from pyspark.sql import functions as dbf
dbf.validate_utf8(str=<str>)
Parameters
| Parameter | Type | Description |
|---|---|---|
str |
pyspark.sql.Column or str |
A column of strings, each representing a UTF-8 byte sequence. |
Returns
pyspark.sql.Column: the input string if it is a valid UTF-8 string, error otherwise.
Examples
from pyspark.sql import functions as dbf
spark.range(1).select(dbf.validate_utf8(dbf.lit("SparkSQL"))).show()