Re: Does NiFi support multiple queries
Karthik, You can send them both to the same PutSQL processor. It won't have any problem with this. Thanks -Mark Sent from my iPhone > On Sep 21, 2016, at 12:07 AM, Karthik Ramakrishnan > wrote: > > Hello - > > I was wondering if NiFi can support multiple queries in the same PutSQL > processor. For example, if an attribute is set to 'update' - will PutSQL run > the defined update query and next time when it is an 'insert' - it runs the > insert query. Or should we go ahead and add two separate processors and make > a decision on the RouteAttributes processor? Any thoughts would be welcome!! > > TIA!! > > -- > Thanks, > Karthik Ramakrishnan > Data Services Intern > Copart Inc. > Contact : +1 (469) 951-8854 >
RE: Does NiFi support multiple queries
Karthik, PutSQL will handle both styles, and for multiple tables, without issue. Internally it creates a separate SQL Batch for each distinct SQL statement in the queue and then executes these batches separately. Feel free to mix as many Inserts/Updates as you wish for as many tables as you wish. Thanks, Peter From: Karthik Ramakrishnan [mailto:karthik.ramakrishna...@gmail.com] Sent: Tuesday, September 20, 2016 9:57 PM To: users@nifi.apache.org Subject: Does NiFi support multiple queries Hello - I was wondering if NiFi can support multiple queries in the same PutSQL processor. For example, if an attribute is set to 'update' - will PutSQL run the defined update query and next time when it is an 'insert' - it runs the insert query. Or should we go ahead and add two separate processors and make a decision on the RouteAttributes processor? Any thoughts would be welcome!! TIA!! -- Thanks, Karthik Ramakrishnan Data Services Intern Copart Inc. Contact : +1 (469) 951-8854
Re: Does NiFi support multiple queries
Thank you people!! Great help. On Wed, Sep 21, 2016 at 7:19 AM, Peter Wicks (pwicks) wrote: > Karthik, > > > > PutSQL will handle both styles, and for multiple tables, without issue. > > > > Internally it creates a separate SQL Batch for each distinct SQL statement > in the queue and then executes these batches separately. Feel free to mix > as many Inserts/Updates as you wish for as many tables as you wish. > > > > Thanks, > > Peter > > > > *From:* Karthik Ramakrishnan [mailto:karthik.ramakrishna...@gmail.com] > *Sent:* Tuesday, September 20, 2016 9:57 PM > *To:* users@nifi.apache.org > *Subject:* Does NiFi support multiple queries > > > > Hello - > > > > I was wondering if NiFi can support multiple queries in the same PutSQL > processor. For example, if an attribute is set to 'update' - will PutSQL > run the defined update query and next time when it is an 'insert' - it runs > the insert query. Or should we go ahead and add two separate processors and > make a decision on the RouteAttributes processor? Any thoughts would be > welcome!! > > > > TIA!! > > > > -- > > Thanks, > > *Karthik Ramakrishnan* > > *Data Services Intern* > > *Copart Inc.* > > *Contact : +1 (469) 951-8854 <%2B1%20%28469%29%20951-8854>* > > > -- Thanks, *Karthik Ramakrishnan* *Contact : +1 (469) 951-8854*