snowflake.snowpark.functions.h3_uncompact_cells_strings¶
- snowflake.snowpark.functions.h3_uncompact_cells_strings(array_of_cell_ids: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns an array of H3 cell IDs at the specified target resolution that are contained within the input array of H3 cell IDs. This function uncompacts H3 cells to a finer resolution.
- Parameters:
array_of_cell_ids (ColumnOrName) – An array of H3 cell ID strings.
target_resolution (ColumnOrName) – The target H3 resolution (0-15).
- Returns:
An array of H3 cell ID strings at the target resolution.
- Return type:
Example:
>>> from snowflake.snowpark.functions import array_construct, lit >>> df = session.create_dataframe([ ... [['8a2a1072339ffff', '892a1072377ffff']], ... [['8a2a1072339ffff']] ... ], schema=["cell_ids"]) >>> df.select(h3_uncompact_cells_strings(df["cell_ids"], lit(10)).alias("uncompacted")).collect() [Row(UNCOMPACTED='[\n "8a2a1072339ffff",\n "8a2a10723747fff",\n "8a2a1072374ffff",\n "8a2a10723757fff",\n "8a2a1072375ffff",\n "8a2a10723767fff",\n "8a2a1072376ffff",\n "8a2a10723777fff"\n]'), Row(UNCOMPACTED='[\n "8a2a1072339ffff"\n]')]