snowflake.snowpark.functions.h3_cell_to_children¶
- snowflake.snowpark.functions.h3_cell_to_children(cell_id: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.40.0/src/snowflake/snowpark/_functions/scalar_functions.py#L1424-L1448)¶
Returns the children of an H3 cell at a specified target resolution.
- Parameters:
cell_id (ColumnOrName) – The H3 cell ID to get children for.
target_resolution (ColumnOrName) – The target resolution for the children cells.
- Returns:
A JSON array string containing the children H3 cell IDs.
- Return type:
- Example::
>>> from snowflake.snowpark.functions import col >>> df = session.create_dataframe([[613036919424548863, 9]], schema=["cell_id", "target_resolution"]) >>> df.select(h3_cell_to_children(col("cell_id"), col("target_resolution")).alias("children")).collect() [Row(CHILDREN='[\n 617540519050084351,\n 617540519050346495,\n 617540519050608639,\n 617540519050870783,\n 617540519051132927,\n 617540519051395071,\n 617540519051657215\n]')]