[
https://issues.apache.org/jira/browse/NIFI-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14577344#comment-14577344
]
Ricky Saltzer commented on NIFI-665:
------------------------------------
Design Idea:
We could expose a property on each of these processors that would enable the
ability to update/create new attributes. If enabled, each flow file sent to the
processor would have a temporary file created (e.g. /some/dir/<ff-uuid>). The
location of this file would be written to a environment variable (e.g.
NIFI_ATTRIBUTES_FILE). This file would initially be empty, and would be up to
the user to set environment variables in the form of Key/Value pairs (e.g
KEY=VALUE). That is, each attribute you wish to update or attach would be a new
line in this file.
After the OS process finishes executing, NiFi would then parse this file for
new or updated attributes and then attach them to the flow file. Finally, the
file would be deleted.
> Design method for attaching attributes using
> ExecuteProcess/ExecuteStreamCommand
> --------------------------------------------------------------------------------
>
> Key: NIFI-665
> URL: https://issues.apache.org/jira/browse/NIFI-665
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Ricky Saltzer
> Assignee: Ricky Saltzer
>
> Currently, the ExecuteProcess and ExecuteStreamCommand processors can only
> consume and produce new flow files. Although they can access attributes
> attached to the flow files through the use of environment variables, they
> have no way to update or attach new attributes.
> I think it could be really useful if there was a generic way for us to attach
> flow file attributes using these two processors. Since environment variables
> created or updated by a flow file are only visible to the executing process,
> we'll unfortunately not be able to utilize it.
> The purpose of this JIRA is to provide a forum for how we could potentially
> solve this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)