Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-13557

Record Inference Code (org.apache.nifi.util.SchemaInferenceUtil.getDataType) Does not Allow Single Digit Months

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.28.0, 2.0.0
    • None
    • None

    Description

      When running tests using the ExcelReader and inferring the schema, even though the date pattern 'M/d/yy' was specified (which per this post should allow single digit months), dates like '1/1/18' are not inferred to be DATE:M/d/yy but rather STRING. The source for this is
      org.apache.nifi.util.text.RegexDateTimeMatcher whose regular expression for months requires two digits. It should be relaxed to allow for one or two digits.

      Attachments

        Issue Links

          Activity

            People

              dstiegli1 Daniel Stieglitz
              dstiegli1 Daniel Stieglitz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m