A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/functions/get_ignore_case below:

Website Navigation


GET_IGNORE_CASE | Snowflake Documentation

Categories:

Semi-structured and structured data functions (Extraction)

GET_IGNORE_CASE

Extracts a field value from an object; returns NULL if either of the arguments is NULL.

Note

This function is similar to GET but applies case-insensitive matching to field names.

See also:

GET

Syntax

OBJECT (or VARIANT containing an OBJECT)

GET_IGNORE_CASE( <object> , <field_name> )

GET_IGNORE_CASE( <variant> , <field_name> )

Copy

MAP

GET_IGNORE_CASE( <map> , <key> )

Copy

Arguments
variant

An expression that evaluates to a VARIANT that contains either an ARRAY or an OBJECT.

object

An expression that evaluates to an OBJECT that contains key-value pairs.

field_name

An expression that evaluates to a VARCHAR. This specifies the key in a key-value pair for which you want to retrieve the value.

field_name must not be an empty string.

If object is a structured OBJECT, you must specify a constant for field_name.

If object does not contain the specified key:

map

An expression that evaluates to a MAP.

key

The key in a key-value pair for which you want to retrieve the value.

If map does not contain the specified key, the function returns NULL.

Returns Usage notes Examples

Extract a field value from an object. The function returns the value for the exact match:

SELECT GET_IGNORE_CASE(TO_OBJECT(PARSE_JSON('{"aa":1, "aA":2, "Aa":3, "AA":4}')),'aA') as output;

+--------+
| OUTPUT |
|--------|
| 2      |
+--------+

Copy

Extract a field value from an object. The function cannot find an exact match and so returns one of the ambiguous matches:

SELECT GET_IGNORE_CASE(TO_OBJECT(PARSE_JSON('{"aa":1, "aA":2, "Aa":3}')),'AA') as output;

+--------+
| OUTPUT |
|--------|
| 3      |
+--------+

Copy

For more detailed examples, see Querying Semi-structured Data.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4