Michael,

Tweaking the 'filename' attribute of a flowfile by using
UpdateAttribute is actually the common pattern.

That said I can see what you're saying about why it would be nice to
specify what will be used as the 'filename' value for a given flow
file.  I could imagine each of those processors having support for a
'flowfile attribute' property on a processor which could be fed an
expression language statement.  That expression language by default
would be ${filename}.  I do think some very confusing cases could
occur with such a model but in any event it could be nice to let the
user control that.  If I have what you're suggesting correct please do
feel free to file a JIRA for that.

Thanks
Joe

On Wed, Sep 2, 2015 at 1:06 PM, Michael Kobit <[email protected]> wrote:
> I was using the 'PutFile' processor, and noticed that you could not specify
> the 'filename', and that it is always taken from the input flowfile's
> 'filename' attribute. I thought it would be useful if it exposed a property
> to explicitly set the filename of the processor, defaulting to
> `${filename}`.
>
> Then I looked at `PutSFTP` and `PutHDFS`, and noticed that they also do not
> expose the filename as a property. It looks like there might have been a
> decision made to not expose it in these. As a workaround it seems like I
> could put an `UpdateAttribute` processor before the `PutFile` that updates
> 'filename' (and possibly path), but I haven't tried. I wasn't sure if I was
> getting into some anti-pattern here.
>
> Is there a reason not to expose the filename as a property?

Reply via email to