snowflake.snowpark.functions.h3_uncompact_cells¶
- snowflake.snowpark.functions.h3_uncompact_cells(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 performs the opposite operation of H3_COMPACT_CELLS by expanding compacted cells to their constituent cells at a finer resolution.
- Parameters:
array_of_cell_ids (ColumnOrName) – Column containing an array of H3 cell IDs to uncompact
target_resolution (ColumnOrName) – Column containing the target H3 resolution level for the uncompacted cells
- Returns:
An array of H3 cell IDs at the target resolution
- Return type:
- Examples::
>>> from snowflake.snowpark.functions import lit >>> df = session.create_dataframe([[[622236750558396415, 617733150935089151]]], schema=["cell_ids"]) >>> df.select(h3_uncompact_cells(df["cell_ids"], lit(10)).alias("uncompacted")).collect() [Row(UNCOMPACTED='[\n 622236750558396415,\n 622236750562230271,\n 622236750562263039,\n 622236750562295807,\n 622236750562328575,\n 622236750562361343,\n 622236750562394111,\n 622236750562426879\n]')]