[ 
https://issues.apache.org/jira/browse/NIFI-8133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268485#comment-17268485
 ] 

Chris Sampson commented on NIFI-8133:
-------------------------------------

Upon further investigation, I was unable to get {{null}} fields output by 
{{PutElasticsearchRecord}} in the current NiFi (I'm using 1.11.4, which led me 
to raise this ticket).

However, that's a problem in itself - there's no way of having {{null}}/empty 
fields sent to Elasticsearch with this processor, while that might actually be 
wanted in some circumstances. Some code within PutElasticsearchRecord removes 
null/empty fields from Maps (objects) before sending to the 
ElasticSearchClientService controller (then on to Elasticsearch) - however, 
there's no way to disable this behaviour. The method also doesn't remove empty 
Maps (objects) or Lists (arrays), which isn't ideal for Elasticsearch output 
either.

I think, therefore, allowing this behaviour to be controlled by the JSON 
serialisation within the controller service makes more sense.

> PutElasticsearchRecord/ElasticSearchClientService  should allow null values 
> to be suppressed
> --------------------------------------------------------------------------------------------
>
>                 Key: NIFI-8133
>                 URL: https://issues.apache.org/jira/browse/NIFI-8133
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.11.4
>            Reporter: Chris Sampson
>            Assignee: Chris Sampson
>            Priority: Major
>         Attachments: NIFI-8133.xml, NIFI-8133_(ES7).json
>
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> The PutElasticsearchRecord (or the related ES client service) should allow 
> for null values to be suppressed (like PutElasticsearchHttpRecord) as it's 
> not always desirable to have null values for empty fields (which might be 
> present in the schema used to read the data in nifi but not populated).
> Likely this will need changes to the configuration of the ObjectMapper used 
> by the ES service depending upon user provided settings.



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

Reply via email to