Re: converting date string to timestamp in json document

2017-01-09 Thread James Wing
Nick, You could use ExecuteScript to manipulate the JSON. The sample ECMAScript below assumes that you already have the transformed timestamp as an attribute "timestamp": var flowFile = session.get(); if (flowFile !== null) { var StreamCallback = Java.type("org.apache.nifi.processor.io.Stre

converting date string to timestamp in json document

2017-01-09 Thread Nick Carenza
Hey folks, I am having a hard time figuring out how to work with date values in json documents using the standard processors available in Nifi. example flowfile: { "time": "2017-01-01T01:14:55+00:00", "any": { "nested": "data" } } what i want: { "time": 1483233295, "any":

Re: problem with executescript processor for python

2017-01-09 Thread mohammed shambakey
Hi nifi was installed as a service. I stopped it and started another instance of nifi (not as a service) and worked correctly (but still not with "executescript" as you said it uses Jython). At the beginning, I thought I should restart the nifi that is installed as a service (may be then nifi ser

Re: SelectHiveQL Incremental

2017-01-09 Thread Matt Burgess
This is not currently possible, but there is a Jira case about adding Hive support to QueryDatabaseTable [1]. The comments mention that paging of results in Hive is not possible, but I've seen some examples using ROWNUMBER OVER() and such, and although complicated and messy (like the PL/SQL statem

SelectHiveQL Incremental

2017-01-09 Thread Provenzano Nicolas
Hi all, The GenerateTableFetch processor allow defining a < max value column > to get only recent rows (for example). Is there any way of doing the same with the SelectHiveQL ? Currently, it seems the SelectHiveQL processor always gets all the rows each time it is run while I would like to get

Re: problem with executescript processor for python

2017-01-09 Thread Matt Burgess
Does the same command work from the command line? Can you share your command-line and ExecuteStreamCommand configuration? Regards, Matt On Mon, Jan 9, 2017 at 11:42 AM, mohammed shambakey wrote: > Hi > > Thank you for the help, but I tried "executestreamcommand" and > "executeprocess", and to ma

Re: problem with executescript processor for python

2017-01-09 Thread mohammed shambakey
Hi Thank you for the help, but I tried "executestreamcommand" and "executeprocess", and to make sure I put the absolute exact location for the python command and I tried with python2 and python3, but still giving me "import probelm: no module named docker". Regards On Mon, Jan 9, 2017 at 10:55 A

Re: problem with executescript processor for python

2017-01-09 Thread mohammed shambakey
Thanks Matt On Mon, Jan 9, 2017 at 10:46 AM, Matt Burgess wrote: > Mohammed, > > ExecuteScript uses the Jython script engine (not pure Python as the > name might imply). The major difference is that Jython cannot load > natively compiled (CPython, e.g.) modules like numpy, scipy, and I > suspec

Re: problem with executescript processor for python

2017-01-09 Thread Matt Burgess
Mohammed, ExecuteScript uses the Jython script engine (not pure Python as the name might imply). The major difference is that Jython cannot load natively compiled (CPython, e.g.) modules like numpy, scipy, and I suspect docker. It can only load and use pure Python modules (meaning modules written

problem with executescript processor for python

2017-01-09 Thread mohammed shambakey
Hi I installed "docker" for python and I can write python script that uses "docker" command. I'm trying to use a nifi "executescript" processor with "python" engine, but each time it tells me it cannot find the "docker" module in the script file, despite I can execute the script file correctly fr

Re: How to untar "tar.gz" file

2017-01-09 Thread Selvam Raman
corrected name xyzprocessor -> CompressContent processor (choose gzip) -> UnpackContent processor (choose tar)-> .. On Mon, Jan 9, 2017 at 2:28 PM, Selvam Raman wrote: > Thank you Mark. I done the same. > > xyzprocessor -> decompress processor -> unpack content processor -> .. > > Thanks, > sel

Re: How to untar "tar.gz" file

2017-01-09 Thread Selvam Raman
Thank you Mark. I done the same. xyzprocessor -> decompress processor -> unpack content processor -> .. Thanks, selvam R On Mon, Jan 9, 2017 at 12:35 PM, Mark Payne wrote: > Hi Selvam, > > UnpackContent supports tar format. Gzip is a compression format that wraps > the tar format. So you would

Re: How to untar "tar.gz" file

2017-01-09 Thread Mark Payne
Hi Selvam, UnpackContent supports tar format. Gzip is a compression format that wraps the tar format. So you would want to use CompressContent set to Decompress mode with gzip as the format. This would give you just a tar file that UnpackContent can handle. Thanks -Mark Sent from my iPhone O

RE: NiFI server restart blocked

2017-01-09 Thread Porta Léonard
Thanks Pierre and Mark for your answers. I managed to remove the template from flow.xml.gz and got rid of the error. But my access issue was somewhere else. It was a firewall config change. Thanks and best regards Leo From: Mark Payne [mailto:marka...@hotmail.com] Sent: jeudi 5 janvier 2017 14:3

How to untar "tar.gz" file

2017-01-09 Thread Selvam Raman
Hi, I used Unpack content processor to extract files from tar.gz mime type. But it gives the tar.gz file as output. i am using nifi 1.0. Unpack processor does not have tar.gz in mime type. Can you please help me. -- Selvam Raman "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"