h3_validate
Returns the input value if it is a valid H3 cell or emits an error otherwise. Supports Spark Connect.
For the corresponding Databricks SQL function, see h3_validate function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_validate(col=<col>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| An integer or string. |
Examples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686030622195711,)], ['h3l'])
df.select(dbf.h3_validate('h3l').alias('result')).collect()
Output
[Row(result=599686030622195711)]