Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7821

Treat Empty String as NULL in JSON Reader

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.19.0
    • Component/s: Storage - JSON
    • Labels:
      None

      Description

      In the JSON below the field `resolved_by` first appears as a map but in records when it is not defined, is empty strings.  This causes SchemaChangeExceptions. 

      I'm wondering if Drill could either ignore or interpret the empty strings as null so that the query will complete.

       

      {{{
      ....
        "skills": "",
            "number": "INC0000001",
            "resolved_by": {
              "link": "https://empmgill4.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
              "value": "6816f79cc0a8016401c5a33be04be441"
            },
            "sys_updated_by": "admin"
      ...
      },

      {       ...       "number": "INC0000002",       "resolved_by": "",       "sys_updated_by": "admin", ... }}

      }

        Attachments

        1. servicenow.json
          211 kB
          Charles Givre

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cgivre Charles Givre
              Reviewer:
              Charles Givre
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: