nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Witt <joe.w...@gmail.com>
Subject Re: Best way to generate a new filename
Date Sun, 05 Jun 2016 16:57:15 GMT
You could generate a unique filename with that extension by using the
following in Update Attribute

Add property:
  property name: filename
  property value: ${uuid}.json

You can also set a directory structure with time stamping this way as
well.  For instance set another attribute on that UpdateAttribute
processor with
  property name: hadoopdir
  property value: /where/to/save/stuff/${now():format('yyyy/MM/dd/HH')}/

Then in your PutHDFS processor you would set the value of the
'directory' property to
  ${hadoopdir}

Thanks
Joe


On Sun, Jun 5, 2016 at 12:44 PM, Igor Kravzov <igork.inexso@gmail.com> wrote:
> Hi,
>
> I am going to use MergeContent processor to merge multiple JSON files before
> passing it to PutHDFS processor. But before that I want to generate a unique
> file name using UpdateAttribute processor. Something with .json as an
> extension.
> What to put into value for filename attribute?
>
> Thanks in advance

Mime
View raw message