IS_INTEGER
Learn how to use the IS_INTEGER semi-structured data function in PlaidCloud Lakehouse. Checks if the input JSON value is an integer. With syntax and examples.
Checks if the input JSON value is an integer.
Analyze Syntax
func.is_integer(<expr>)
Analyze Example
func.is_integer(func.parse_json('123')), func.is_integer(func.parse_json('[1,2,3]'))
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ func.is_integer(func.parse_json('123')) │ func.is_integer(func.parse_json('[1,2,3]')) │
├──────────────────────────────────────────┼─────────────────────────────────────────────┤
│ true │ false │
└────────────────────────────────────────────────────────────────────────────────────────┘
SQL Syntax
IS_INTEGER( <expr> )
Return Type
Returns true if the input JSON value is an integer, and false otherwise.
SQL Examples
SELECT
IS_INTEGER(PARSE_JSON('123')),
IS_INTEGER(PARSE_JSON('[1,2,3]'));
┌───────────────────────────────────────────────────────────────────┐
│ is_integer(parse_json('123')) │ is_integer(parse_json('[1,2,3]')) │
├───────────────────────────────┼───────────────────────────────────┤
│ true │ false │
└───────────────────────────────────────────────────────────────────┘