snowflake.snowpark.functions.h3_try_polygon_to_cells¶
- snowflake.snowpark.functions.h3_try_polygon_to_cells(geography_polygon: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Returns an array of H3 cell IDs that cover the given geography polygon at the specified resolution. This is a “try” version that returns None instead of raising an error if the conversion fails.
- Parameters:
geography_polygon (ColumnOrName) – The GEOGRAPHY polygon object.
target_resolution (ColumnOrName) – The H3 resolution level (0-15).
- Returns:
An array of H3 cell IDs as BIGINT values, or None if conversion fails.
- Return type:
Example: