snowflake.snowpark.functions.h3_point_to_cell_string¶
- snowflake.snowpark.functions.h3_point_to_cell_string(geography_point: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the H3 cell ID string for a given geography point at the specified resolution.
- Parameters:
geography_point (ColumnOrName) – The geography point to convert to H3 cell.
target_resolution (ColumnOrName) – The target H3 resolution (0-15).
- Returns:
H3 cell ID string for the given geography point at the specified resolution.
- Return type:
- Example::
>>> from snowflake.snowpark.functions import col >>> df = session.sql("SELECT ST_POINT(13.377704, 52.516262) as point, 8 as resolution") >>> df.select(h3_point_to_cell_string(col("point"), col("resolution"))).collect() [Row(H3_POINT_TO_CELL_STRING("POINT", "RESOLUTION")='881f1d4887fffff')]