You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mike Thomsen (Jira)" <ji...@apache.org> on 2020/11/06 00:24:00 UTC

[jira] [Resolved] (NIFI-7891) Allow for Defaults to be set by Avro writers

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

Mike Thomsen resolved NIFI-7891.
--------------------------------
    Resolution: Won't Do

As mentioned on GitHub, the contribution is appreciated, but we have to pass because it would introduce a lot of potentially disruptive behavior to users of schema inference.

> Allow for Defaults to be set by Avro writers
> --------------------------------------------
>
>                 Key: NIFI-7891
>                 URL: https://issues.apache.org/jira/browse/NIFI-7891
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Alasdair Brown
>            Assignee: Alasdair Brown
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This would be an improvement to Avro writer services. Allowing a set of default values to be given based on the data type when infering the schema.
>  
> For example, you could have an additional property per type (e.g. Int, String, etc.) where the value of the property would be used as the default value. However, this would add a lot of properties.... Possibly you could provide a JSON set of types -> defaults, e.g.
> {code:java}
> [
>    { "type":"string", "default":"test"},
>    { "type":"int",    "default":1},
> ]{code}
> Thus, for any field inferred as type String, it's embedded Avro schema contains a default value entry for that field.
> This would then provide flexibility where NULL values are present  - the current behaviour only supports adding NULL to the allowable types - this would be a very useful alternative.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)