nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Sequeiros <helloj...@gmail.com>
Subject Re: How to preserve original file name
Date Thu, 30 Nov 2017 03:00:26 GMT
Hi forgot to mention if posting to ListenHTTP
You must set “HTTP Headers to receive as Attributes (Regex)” to

.*

Or something more restrictive to include “filename”

Hope that helps.
On Wed, Nov 29, 2017 at 7:14 PM Juan Sequeiros <hellojuan@gmail.com> wrote:

> Hi,
>
> My experience has been that I need to pass it as a header with filename
> “attribute”
>
>
> So — header “filename: AfileName”
>
> Sorry on my mobile.
>
> On Wed, Nov 29, 2017 at 6:43 PM tj5527 <tj5527@protonmail.com> wrote:
>
>> I use the latest the nifi version (1.4.0) transforming xml to json. The
>> flow is done through
>>
>>     listen http -> transform xml -> put file
>>
>> Posting is done by executing
>>
>>     curl -X POST -d @/path/to/xml localhost:<port>/contentListener
>>
>> The entire process works perfectly with a single xml file. But when
>> trying to post large amount of xml files, I notice there exception thrown.
>> But the exception message doesn't show which file goes wrong, so I can't
>> find it. Therefore my question is how do I preserve the original file name
>> so that when the exception is thrown I know which one goes wrong.
>>
>> What I can think of is creating another put file processor which links to
>> transform xml processor when it fails. But I am not sure if the file name
>> would be preserved because I notice when it processes successfully (i.e.
>> successfully transformed xml's file name is renamed to something like
>> 52943123, which is nothing related to the original xml file name). Is there
>> any way to log the file name when transformation goes wrong?
>>
>> Thanks
>>
>>
>>
>>
>>
>>

Mime
View raw message