snowflake.snowpark.functions.h3_cell_to_children_string¶
- snowflake.snowpark.functions.h3_cell_to_children_string(cell_id: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the children of the given H3 cell at the specified target resolution as a JSON array string.
- Parameters:
cell_id (ColumnOrName) – Column containing the H3 cell ID.
target_resolution (ColumnOrName) – Column containing 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([["881F1D4887FFFFF", 9]], schema=["cell_id", "target_resolution"]) >>> df.select(h3_cell_to_children_string(col("cell_id"), col("target_resolution"))).collect() [Row(H3_CELL_TO_CHILDREN_STRING("CELL_ID", "TARGET_RESOLUTION")='[\n "891f1d48863ffff",\n "891f1d48867ffff",\n "891f1d4886bffff",\n "891f1d4886fffff",\n "891f1d48873ffff",\n "891f1d48877ffff",\n "891f1d4887bffff"\n]')]