RE: Generate flowfiles from flowfile content

2015-09-23 Thread David Klim
ExtractText did the job! Thank you very much! :-) > Date: Wed, 23 Sep 2015 16:05:44 -0700 > Subject: Re: Generate flowfiles from flowfile content > From: joe.w...@gmail.com > To: users@nifi.apache.org > > Bryan - you may be right that ExtractText will be the right play once > splitjson is done do

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread Joe Witt
well if you're willing to overlook the two jira's we uncovered for this case and still think we're cool then you're kind of an awesome user yourself! Thanks Joe On Wed, Sep 23, 2015 at 9:08 PM, indus well wrote: > Thanks, Joe. That did it, exactly what I was looking for. > > You guys and NiFi ro

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread indus well
Thanks, Joe. That did it, exactly what I was looking for. You guys and NiFi rock! On Wed, Sep 23, 2015 at 10:43 PM, Joe Witt wrote: > Indus, > > We should probably have another JIRA to have the InvokeHTTP processor > capture response headers and store them as flow file attributes or at > least

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread Joe Witt
Indus, We should probably have another JIRA to have the InvokeHTTP processor capture response headers and store them as flow file attributes or at least as a single attribute with the headers on it - something. However, the core need you have is totally doable. I'd recommend the following flow:

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread indus well
Worked like a charm! Thank you for your quick response, Daryl and Mark. The content of the downloaded file is stored in the file generated FlowFile with a random filename, how would I rename the output file to actual downloaded filename? By the way, the ticket is a good enhancement. Thanks, Ind

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread Mark Payne
Indus, As Daryl mentioned, InvokeHTTP will allow you to use the Expression Language to do an HTTP GET. It works a bit differently, though, because GetHTTP is a "Source Processor" whereas InvokeHTTP needs to be fed a FlowFile to do anything. So you can use GenerateFlowFile as a source and have i

Re: GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread Daryl Teo
Indus - use InvokeHTTP Daryl On Thu, Sep 24, 2015 at 11:07 AM, indus well wrote: > Hello NiFi Experts: > > The GetHTTP processor works fine with static filename when getting files > from a website. However, I have a use case where I need to download a file > daily and the filename is the date o

GetHTTP Usage with Dynamic Filenames

2015-09-23 Thread indus well
Hello NiFi Experts: The GetHTTP processor works fine with static filename when getting files from a website. However, I have a use case where I need to download a file daily and the filename is the date of today, ie: 09222015.zip. Since the URL property of the GetHTTP does not support expression l

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Joe Witt
Bryan - you may be right that ExtractText will be the right play once splitjson is done doing its thing. Perhaps either will work. Maybe we can show either or. If the schema is fairly well known i'm thinking extract json would be the winner. thanks Joe On Wed, Sep 23, 2015 at 4:04 PM, Bryan Be

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Bryan Bende
Sorry I missed Joe's email while sending mine... I can put together a template showing this. On Wednesday, September 23, 2015, Bryan Bende wrote: > David, > > Take a look at ExtractText, it is for pulling FlowFile content into > attributes. I think that will do what you are looking for. > > -Bry

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Joe Witt
David, Could you share a sample of your JSON that you get from pulling in from SQS? Thanks Joe On Wed, Sep 23, 2015 at 4:01 PM, Bryan Bende wrote: > David, > > Take a look at ExtractText, it is for pulling FlowFile content into > attributes. I think that will do what you are looking for. > > -B

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Bryan Bende
David, Take a look at ExtractText, it is for pulling FlowFile content into attributes. I think that will do what you are looking for. -Bryan On Wednesday, September 23, 2015, David Klim wrote: > Hello Bryan, > > I should have been more specific. What I am trying to do is to fetch files > from

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Joe Witt
David, I think if i read your case correctly this should be supported really well. The flow would be something like: GetSQS -> SplitJson -> EvaluateJsonPath -> FetchS3Object In SplitJSON you'll break apart the original object into smaller valid JSON objects. In evaluate JsonPath you'll promote

RE: Generate flowfiles from flowfile content

2015-09-23 Thread David Klim
Hello Bryan, I should have been more specific. What I am trying to do is to fetch files from S3. I am using the GetSQS processor to get new object (files) events, and each event is a json containing the list of new objects (files) in the bucket. The output of the GetSQS is processed by SplitJson

RE: Generate flowfiles from flowfile content

2015-09-23 Thread Rick Braddy
Good idea, Adam. I will post a separate review thread on the dev@ list to track comments. Here’s the repository link: https://github.com/rickbraddy/nifishare Thanks Rick From: Adam Taft [mailto:a...@adamtaft.com] Sent: Wednesday, September 23, 2015 1:48 PM To: users@nifi.apache.org Subject: R

Re: ExtractText Capturing Groups Limit (1-40)

2015-09-23 Thread Joe Witt
Adam, We really should just allow it to be configurable. We tend to be conservative on such cases but you should have control. Interested in filing a JIRA? Thanks Joe On Wed, Sep 23, 2015 at 10:01 AM, Adam Williams wrote: > I've been playing with the ExtractText processor and added lots of ca

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Adam Taft
Not speaking for the entire community, but I am sure that such a contribution would (at minimum) be appreciated for review, consideration and potential inclusion. The best thing would be ideally hosting the source code somewhere that the rest of the community could go to for review. Maybe you cou

RE: Generate flowfiles from flowfile content

2015-09-23 Thread Rick Braddy
We have already developed modified a modified GetFIle called GetFileData that takes an incoming FlowFile containing the path to the file/directory that needs to be transferred. There is a corresponding PutFileData on the other side that accepts the incoming file/directory that creates the direc

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Adam Taft
Right. This would be the use case that FetchFile [1] would help solve. [1] https://issues.apache.org/jira/browse/NIFI-631 On Wed, Sep 23, 2015 at 1:11 PM, Bryan Bende wrote: > Hi David, > > When you say "files I need to retrieve", are you referring to files on the > local filesystem where NiFi

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Mark Payne
One thing to note, if trying to pull a file from the local file system is that there is a ticket already [1] that would allow us to pull a file from the local file system using an attribute value. I know this ticket is actively being worked, but I don't know exactly when we are expecting to have

Re: Generate flowfiles from flowfile content

2015-09-23 Thread Bryan Bende
Hi David, When you say "files I need to retrieve", are you referring to files on the local filesystem where NiFi is running? If so, I am not aware of an existing processor that does that. Currently we have GetFile which polls a directory, but that is not what you want here. It would be fairly st

ExtractText Capturing Groups Limit (1-40)

2015-09-23 Thread Adam Williams
I've been playing with the ExtractText processor and added lots of capturing groups, for a single property i split into ~50 capturing groups, but the processor shows a warning that we can only have between 1 & 40 capturing groups. Is it wrong to go over this? Just parsing a wide CSV file with

Generate flowfiles from flowfile content

2015-09-23 Thread David Klim
Hello, In a flow I am defining, I receive a flowfile containing json string. Using the splitJson processor I can extract some json paths pointing to some files I need to retrieve, but the filename is the content of the generated flowfile. So I would need to be able to read the content and genera