Gideon Korir created NIFI-5572:
----------------------------------
Summary: Support decimal as a RecordFieldType
Key: NIFI-5572
URL: https://issues.apache.org/jira/browse/NIFI-5572
Project: Apache NiFi
Issue Type: Improvement
Components: Core Framework
Affects Versions: 1.7.1
Reporter: Gideon Korir
I'm building a custom RecordReader to import financial data from extracts in a
custom file format. Everything works except when converting from Avro Schema to
RecordSchema, the decimal information is silently converted to double causing
the reader to interpret the transaction values as doubles.
It would be nice if we had native support for Decimals as now I have to read
the values as string and then run a spark job to convert them to doubles.
My suggestion would be:
# Add a RecordFieldType.DECIMAL value
# Add a DecimalDataType class that has `getPrecision()` and `getScale()`
getters
# Add a `RecordFieldType.getDecimalDataType(precision, scale)` method to
create an instance of the RecordFieldType.DECIMAL value
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)