snowflake.snowpark.functions.get_ignore_case

snowflake.snowpark.functions.get_ignore_case(obj: Union[Column, str], field: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L6356-L6369)

Extracts a field value from an object. Returns NULL if either of the arguments is NULL. This function is similar to get() but applies case-insensitive matching to field names.

Examples:

>>> df = session.create_dataframe([{"a": {"aa": 1, "bb": 2, "cc": 3}}])
>>> df.select(get_ignore_case(df["a"], lit("AA")).alias("get_ignore_case")).collect()
[Row(GET_IGNORE_CASE='1')]
Copy
语言: 中文