path_exists¶
Description¶
Given a column and path, return whether the JSON path exists in that column. Must have a valid column.
Return type¶
bool
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
path_exists( object, path )
Argument |
Type |
Required |
Multiple |
Constant |
---|---|---|---|---|
object |
object |
Required |
Only one |
Variable |
path |
string |
Required |
Only one |
Variable |
Examples¶
path_exists(A, 'C')
Returns whether JSON path ‘C’ exists in column A.
path_exists(A, 'B.C')
Returns whether JSON path ‘B.C’ exists in column A. A value containing the path may be { B: { C: 1 } }.
path_exists(@aaa.B, 'C')
Returns whether JSON path ‘C’ exists in column A of input ‘aaa’. Referencing non-default inputs only works in join verb projection expressions.