H3_TRY_GRID_PATH

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

A special version of H3_GRID_PATH that returns NULL if an error occurs when it attempts to return an array of VARIANT values that contain the IDs of the H3 cells that represent the line between two cells.

Syntax

H3_TRY_GRID_PATH( <cell_id_1> , <cell_id_2> )

Parameters

NameRequiredDescription
cell_id_1requiredAn INTEGER value that represents the H3 cell ID (index), or a VARCHAR value that represents the cell ID in hexadecimal format.
cell_id_2requiredAn INTEGER value that represents the H3 cell ID (index), or a VARCHAR value that represents the cell ID in hexadecimal format.

Returns

Returns a value of the ARRAY data type or NULL. - If the function performs a successful calculation, returns an array of VARIANT values that contain the IDs of H3 cells that represent the line between the cells specified by cell_id_1 and cell_id_2. For information about the format of the IDs, see H3_GRID_PATH. - If the line cannot be calculated (for example, when two cells belong to non-neighboring base cells), returns NULL without reporting an error.

Usage notes