You are viewing documentation about an older version (1.5.0). View latest version

snowflake.snowpark.functions.get_path

snowflake.snowpark.functions.get_path(col: Column | str, path: Column | str) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.5.0/src/snowflake/snowpark/functions.py#L5601-L5613)

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')]
Copy
Language: English