You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (JIRA)" <ji...@apache.org> on 2019/03/06 19:03:00 UTC

[jira] [Updated] (NIFI-5572) Support decimal as a RecordFieldType

     [ https://issues.apache.org/jira/browse/NIFI-5572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Burgess updated NIFI-5572:
-------------------------------
    Labels:   (was: newbie)

> 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
>            Priority: Major
>
> 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)