Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47992

Support recursive descent path in get_json_object function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • SQL
    • None

    Description

      JSONPath borrows recursive descent syntax from E4X. We could use it to collect json object from json map string.

      // json data
      {"key1": {"b": {"c": "c1", "d": "d1", "e": "e1"}}}
      {"key2": {"b": {"c": "c2", "d": "d2", "e": "e2"}}}
      
      select get_json_object(data, '$..c'); -- [c1, c2]

      ref: https://goessner.net/articles/JsonPath/index.html#e2

      Attachments

        Activity

          People

            Unassigned Unassigned
            dcoliversun Qian Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: