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

Add JSON Configuration Options to HTTP Rest Plugin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.19.0
    • 1.20.0
    • Storage - Other
    • None

    Description

      Drill has a collection of JSON configuration options to allow you to configure how Drill interprets JSON files. These are set at the global level, however the HTTP plugin
      allows you to configure these options individually per connection and override the Drill defaults. The options are:

      • `allowNanInf`: Configures the connection to interpret `NaN` and `Inf` values
      • `allTextMode`: By default, Drill attempts to infer data types from JSON data. If the data is malformed, Drill may throw schema change exceptions. If your data is
        inconsistent, you can enable `allTextMode` which when true, Drill will read all JSON values as strings, rather than try to infer the data type.
      • `readNumbersAsDouble`: By default Drill will attempt to interpret integers, floating point number types and strings. One challenge is when data is consistent, Drill may
        throw schema change exceptions. In addition to `allTextMode`, you can make Drill less sensitive by setting the `readNumbersAsDouble` to `true` which causes Drill to read all
        numeric fields in JSON data as `double` data type rather than trying to distinguish between ints and doubles.
      • `enableEscapeAnyChar`: Allows a user to escape any character with a \

      All of these can be set by adding the `jsonOptions` to your connection configuration as shown below:

      ```json

      "jsonOptions":

      { "allTextMode": true, "readNumbersAsDouble": true }

      ```

      Attachments

        Activity

          People

            cgivre Charles Givre
            cgivre Charles Givre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: