Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B7486200D5A for ; Thu, 30 Nov 2017 04:00:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B5C5F160C16; Thu, 30 Nov 2017 03:00:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D6B4F160C04 for ; Thu, 30 Nov 2017 04:00:40 +0100 (CET) Received: (qmail 65518 invoked by uid 500); 30 Nov 2017 03:00:39 -0000 Mailing-List: contact users-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@nifi.apache.org Delivered-To: mailing list users@nifi.apache.org Received: (qmail 65508 invoked by uid 99); 30 Nov 2017 03:00:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2017 03:00:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2AD66C40DF for ; Thu, 30 Nov 2017 03:00:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.079 X-Spam-Level: ** X-Spam-Status: No, score=2.079 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KB_WAM_FROM_NAME_SINGLEWORD=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id a7x6S1OKvMQX for ; Thu, 30 Nov 2017 03:00:38 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DD90D5F231 for ; Thu, 30 Nov 2017 03:00:37 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id 64so9642524wme.3 for ; Wed, 29 Nov 2017 19:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XWWjARiD7UAZqT/NT+F0VGqQgWpBFhXtWJWU2T8o5DA=; b=ew3QUHw8DwYNKpvCaltI9VPLeOTpUrABCgaUYIGwtkYMl6XIe0/aS3CiQYwsFPKEHM BiiZdGpyf6LVN/GosFkrJY2vcgsk+hugRv9oDfugmZVhtJ4UrGvuFJxbPNmwo6WOX6Nv IvYGDjAs4i+oAIBLKwNSkBJB5zzOzmxwC2/D8UBBLF3Tdtvach2MQy2MpWL637jdJ//+ iC59m0p3yUE3zKXtGztGbsXMy/OE9mhqC/tGNcPFFVPY5cl2VnO9F3B1CQXTZ2NEbhDu R0p/oYidq+RKNHsXXYwzwo8DrUuRZWBn7ObhrU3LYwZA7vXUOkqtV330DVUWtsDEd58K 4Osw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=XWWjARiD7UAZqT/NT+F0VGqQgWpBFhXtWJWU2T8o5DA=; b=idx09LS0Voj3SgMgGsZyf0dMHHMEABlQF45gLDmlvZjbtfZe5tgxu4vp2S3GpIVI2b WFyP/bbaVvfBnM9r679oT7zOnCv+zlvFa97jcL92pNDuag7BJA+AdqF15m17ntwyQx17 lxLOfwXbIS7Srabgur6FCNX06Qp45D3OODXn34kWE5tVg4bLqDYb35HrJT/YWe9seSi8 FCXjZ58hcBn0naAzhoxsSEKJu4t9vSQq7++Esw1C81Nofugq6qqiGmH4j1B5urEMnIzG UXmcvZiGB06FW/EiyKO2gK2V8SQmO/KF2Ns3HmLuxRph0EfEUkI2qNgJ3c51oSgIylrj em1g== X-Gm-Message-State: AJaThX79IE8PvdChdqj0Q2kg+jBZIqPfQKzw3txlbc9nTUFscPVhjg// xjNnRzVCodlOb2cHDEU+2N1h/x0DKBEzZRUIwcM= X-Google-Smtp-Source: AGs4zMa3fo2ZxA9H/OJ4p5a4bwSWO5vkCD0JAwSVj3OmRHrj9tTWU32wyQB1rtHN/+muK7Os7VoIV5xi2x+JD0baPPM= X-Received: by 10.80.141.9 with SMTP id s9mr10798795eds.238.1512010836900; Wed, 29 Nov 2017 19:00:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Juan Sequeiros Date: Thu, 30 Nov 2017 03:00:26 +0000 Message-ID: Subject: Re: How to preserve original file name To: tj5527 , users@nifi.apache.org Content-Type: multipart/alternative; boundary="94eb2c1a58d6d48105055f2a74ac" archived-at: Thu, 30 Nov 2017 03:00:41 -0000 --94eb2c1a58d6d48105055f2a74ac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi forgot to mention if posting to ListenHTTP You must set =E2=80=9CHTTP Headers to receive as Attributes (Regex)=E2=80= =9D to .* Or something more restrictive to include =E2=80=9Cfilename=E2=80=9D Hope that helps. On Wed, Nov 29, 2017 at 7:14 PM Juan Sequeiros wrote: > Hi, > > My experience has been that I need to pass it as a header with filename > =E2=80=9Cattribute=E2=80=9D > > > So =E2=80=94 header =E2=80=9Cfilename: AfileName=E2=80=9D > > Sorry on my mobile. > > On Wed, Nov 29, 2017 at 6:43 PM tj5527 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:/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 throw= n. >> 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 na= me >> 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 t= o >> transform xml processor when it fails. But I am not sure if the file nam= e >> 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 th= ere >> any way to log the file name when transformation goes wrong? >> >> Thanks >> >> >> >> >> >> --94eb2c1a58d6d48105055f2a74ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi forgot to mention if posting to ListenHTTP
You must set =E2=80=9CHTTP= Headers to receive as Attributes (Regex)=E2=80=9D to

.*

Or = something more restrictive to include =E2=80=9Cfilename=E2=80=9D

Hop= e 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 pa= ss it as a header with filename =E2=80=9Cattribute=E2=80=9D


So =E2=80=94 header =E2=80=9Cfilename: AfileName=E2=80=9D

Sorry on my mobile.=

On Wed, Nov 29, 2017 at 6:43= PM tj5527 <t= j5527@protonmail.com> wrote:
I use the latest the nifi version (1.4.0) transforming xml to json. T= he flow is done through

=C2=A0 =C2=A0 listen = http -> transform xml -> put file

Postin= g is done by executing
=C2=A0 =C2=A0
=C2=A0 = =C2=A0 curl -X POST -d @/path/to/xml localhost:<port>/contentListener= =C2=A0=C2=A0

The entire process works perfectl= y 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 sh= ow 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 thro= wn I know which one goes wrong.=C2=A0

What I c= an 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 p= reserved because I notice when it processes successfully (i.e. successfully= transformed xml's file name is renamed to something like 52943123, whi= ch is nothing related to the original xml file name). Is there any way to l= og the file name when transformation goes wrong?

Thanks




=

--94eb2c1a58d6d48105055f2a74ac--