You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Karthik Ramakrishnan <ka...@gmail.com> on 2016/09/21 03:56:32 UTC
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
Posted by Karthik Ramakrishnan <ka...@gmail.com>.
Thank you people!! Great help.
On Wed, Sep 21, 2016 at 7:19 AM, Peter Wicks (pwicks) <pw...@micron.com>
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.ramakrishnan20@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*
RE: Does NiFi support multiple queries
Posted by "Peter Wicks (pwicks)" <pw...@micron.com>.
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.ramakrishnan20@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
Posted by ma...@hotmail.com.
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 <ka...@gmail.com> 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
>