snowflake.snowpark.functions.get_path¶
- snowflake.snowpark.functions.get_path(col: Union[Column, str], path: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L6456-L6468)¶
Extracts a value from semi-structured data using a path name.
Examples:
>>> df = session.create_dataframe([{"a": {"aa": {"dd": 4}, "bb": 2, "cc": 3}}]) >>> df.select(get_path(df["a"], lit("aa.dd")).alias("get_path")).collect() [Row(GET_PATH='4')]