[
https://issues.apache.org/jira/browse/NIFI-7891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alasdair Brown reassigned NIFI-7891:
------------------------------------
Assignee: Alasdair Brown
> 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: 20m
> 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)