Re: Execute Script - Groovy get attribute

2020-06-03 Thread Andy LoPresto
It also seems like you would rather set the flowfile batch count as a _property_ on the ExecuteScript processor and obtain it from the session, rather than check a specific flowfile for an attribute which may or may not exist. Andy LoPresto alopre...@apache.org alopresto.apa...@gmail.com He/Hi

Getfile Count

2020-06-03 Thread KhajaAsmath Mohammed
Hi, I am looking for below approach, any ideas on this please Getfile --> CountOfFiles(GetFileFolder) -->Pass Count as attribute to all flow files. Thanks, Asmath

PutSQL and AutoCommit Mode Still Commits

2020-06-03 Thread Shawn Weeks
It appears that PutSQL calls a commit even when set to autoCommit true mode. This breaks things if a driver raises an error on commit in autoCommit mode. For example redshift does this. Thanks Shawn

Re: PutSQL and AutoCommit Mode Still Commits

2020-06-03 Thread Shawn Weeks
Per the JDBC Spec calling commit() on a connection in auto-commit should raise a SQLException so what we’re doing is out of spec. https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#commit() We should probably check c.getProperty(AUTO_COMMIT).asBoolean() and only call commit if w

Re: PutSQL and AutoCommit Mode Still Commits

2020-06-03 Thread Juan Pablo Gardella
Which driver? On Wed, 3 Jun 2020 at 17:20, Shawn Weeks wrote: > Per the JDBC Spec calling commit() on a connection in auto-commit should > raise a SQLException so what we’re doing is out of spec. > > > > https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#commit() > > > > We shoul

Re: PutSQL and AutoCommit Mode Still Commits

2020-06-03 Thread Shawn Weeks
https://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html#download-jdbc-driver https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/1.2.43.1067/RedshiftJDBC42-no-awssdk-1.2.43.1067.jar Thanks From: Juan Pablo Gardella Reply-To: "users@nifi.apache.org" Date: Wednesday,

Re: PutSQL and AutoCommit Mode Still Commits

2020-06-03 Thread Shawn Weeks
Specifically try adding a partition to an external table aka RedShift Spectrum which can’t be execute in a transaction. Thanks From: Juan Pablo Gardella Reply-To: "users@nifi.apache.org" Date: Wednesday, June 3, 2020 at 3:29 PM To: "users@nifi.apache.org" Subject: Re: PutSQL and AutoCommit Mo