Re: Object not recognized in ExecuteScript

2018-02-15 Thread Mike Thomsen
Jim, You need to call session.commit() periodically if you want to progressively push flowfiles out. Though you need to think about the failure scenarios your script has and whether you really want to sacrifice the ability to do a rollback in the event things go wrong. On Thu, Feb 15, 2018 at 6:

Re: Object not recognized in ExecuteScript

2018-02-15 Thread James McMahon
Matt, I have noticed another behavior pattern I hope to correct, but I don't fully understand it and so hope that you can provide some insights. I have embedded the flowFile related commands to create the flowFiles within my file processing loop. My expectation was that I would see the output queu

Re: Object not recognized in ExecuteScript

2018-02-12 Thread James McMahon
I see. Thank you Matt. -Jim On Mon, Feb 12, 2018 at 12:10 PM, Matt Burgess wrote: > Jim, > > In this case I don't think it's as much that the modules aren't being > found, rather that the datetime module in Jython returns > java.sql.Timestamp (Java) objects, rather than Jython/Python datetime >

Re: Object not recognized in ExecuteScript

2018-02-12 Thread Matt Burgess
Jim, In this case I don't think it's as much that the modules aren't being found, rather that the datetime module in Jython returns java.sql.Timestamp (Java) objects, rather than Jython/Python datetime objects, and the former do not support the methods/attributes of the latter, including timetuple

Object not recognized in ExecuteScript

2018-02-12 Thread James McMahon
Good afternoon. I havd a python script that I can execute from the command line via my python interpreter. In it, I do this myTime = time.mktime(myDateTime.timetuple()) When I try to run from my ExecuteScript processor in NiFi, this is not recognized. This error gets thrown: 'java.sql.Timestamp'