[
https://issues.apache.org/jira/browse/NIFI-13557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Stieglitz updated NIFI-13557:
------------------------------------
Description:
When running tests using the ExcelReader and inferring the schema even though
the date pattern 'M/d/yy' was specified, 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 1 or two digits.
was:
When running tests using the ExcelReader and inferring the schema even though
the date pattern 'M/d/yy' was specified, 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.
> Record Inference code (org.apache.nifi.util.SchemaInferenceUtil.getDataType)
> does not allow single digit Months
> ---------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-13557
> URL: https://issues.apache.org/jira/browse/NIFI-13557
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Daniel Stieglitz
> Assignee: Daniel Stieglitz
> Priority: Major
>
> When running tests using the ExcelReader and inferring the schema even though
> the date pattern 'M/d/yy' was specified, 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 1 or two digits.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)