Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink Table
  • Expressions
  • pyflink.table.expression.Expression.json_exists

pyflink.table.expression.Expression.json_exists#

Expression.json_exists(path: str, on_error: JsonExistsOnError | None = None) → Expression[bool][source]#

Determines whether a JSON string satisfies a given search criterion.

This follows the ISO/IEC TR 19075-6 specification for JSON support in SQL.

Examples:

>>> lit('{"a": true}').json_exists('$.a') # True
>>> lit('{"a": true}').json_exists('$.b') # False
>>> lit('{"a": [{ "b": 1 }]}').json_exists('$.a[0].b') # True

>>> lit('{"a": true}').json_exists('strict $.b', JsonExistsOnError.TRUE) # True
>>> lit('{"a": true}').json_exists('strict $.b', JsonExistsOnError.FALSE) # False

Added in version 1.12.0.

previous

pyflink.table.expression.Expression.is_json

next

pyflink.table.expression.Expression.json_value

On this page
  • Expression.json_exists()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.