<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Nifi: Multiple databases , same query, how do pass database name to the connection string? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240252#M202058</link>
    <description>&lt;P&gt;The solution worked! I had some strange error my side that disappeared after a clean setup of the flow. Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jan 2019 18:41:27 GMT</pubDate>
    <dc:creator>azure</dc:creator>
    <dc:date>2019-01-21T18:41:27Z</dc:date>
    <item>
      <title>Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240247#M202053</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm trying to connect to different databases that all have the same structure and execute the same query on them. However, i can't figure out how to give this to nifi execute SQL processor and i'm having to create a processor for every connection to the database. IS there a way for me to create a list of connection strings and then simply loop through them?&lt;/P&gt;&lt;P&gt;i.e. i need to dynamically assign the connection pooling service to the processor. How?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:03:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240247#M202053</guid>
      <dc:creator>azure</dc:creator>
      <dc:date>2022-09-16T14:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240248#M202054</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/103384/azure.html" nodeid="103384"&gt;@Yasir Khokhar&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Starting from NiFi-1.7 version we can dynamically assign connection pooling service by using&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.7.0/org.apache.nifi.dbcp.DBCPConnectionPoolLookup/index.html" target="_blank"&gt;DBCPConnectionPoolLookup&lt;/A&gt; controller service.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From documentation:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1.Provides a DBCPService that can be used to dynamically select another DBCPService. This service requires an attribute named 'database.name' to be passed in when asking for a connection, and will throw an exception if the attribute is missing.
2.The value of 'database.name' will be used to select the DBCPService that has been registered with that name. 
3.This will allow multiple DBCPServices to be defined and registered, and then selected dynamically at runtime by tagging flow files with the appropriate 'database.name' attribute&lt;/PRE&gt;&lt;P&gt;If you are using &lt;STRONG&gt;NiFi version &amp;lt;1.7.0&lt;/STRONG&gt; then we need to have to define each DBCPConnection controller service for each connection of ExecuteSql processor.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jan 2019 10:58:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240248#M202054</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-01-12T10:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240249#M202055</link>
      <description>&lt;P&gt;@shu &lt;/P&gt;&lt;P&gt;Many thanks for responding--however, with this solution I will need multiple ExecuteSQL processors each specifying the database.name attribute value, correct? I'll end up with dozens of ExecuteSQL processors that have the same SQL but different Database.name. &lt;/P&gt;&lt;P&gt;Is my understanding correct or am i missing a trick? &lt;/P&gt;&lt;P&gt;I guess, the question is, how/where do i set the database.name attribute? I've configured the service, but how is the execute SQL processor configured?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jan 2019 19:18:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240249#M202055</guid>
      <dc:creator>azure</dc:creator>
      <dc:date>2019-01-12T19:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240250#M202056</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/103384/azure.html" nodeid="103384"&gt;@Yasir Khokhar&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;If you are using &lt;STRONG&gt;DBCPConnectionPoolLookup&lt;/STRONG&gt; controller service for &lt;STRONG&gt;ExecuteSQL&lt;/STRONG&gt; processor then each flowfile feeding to ExecuteSQL processor needs to have &lt;STRONG&gt;&lt;EM&gt;database.name&lt;/EM&gt;&lt;/STRONG&gt; attribute with the value of &lt;STRONG&gt;DBCPconnectionpool name&lt;/STRONG&gt; that is given.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Now based on &lt;STRONG&gt;&lt;EM&gt;database.nam&lt;/EM&gt;e&lt;/STRONG&gt; attribute value &lt;STRONG&gt;ExecuteSQL&lt;/STRONG&gt; processor is going to select &lt;STRONG&gt;connectionpool&lt;/STRONG&gt; dynamically, so we are going to use one ExecuteSQL processor using multiple &lt;STRONG&gt;DBCPconnectionPool&lt;/STRONG&gt; dynamically.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;&lt;EM&gt;UpdateAttribute&lt;/EM&gt;&lt;/STRONG&gt; Processor to set &lt;STRONG&gt;&lt;EM&gt;database.name&lt;/EM&gt;&lt;/STRONG&gt; attribute to the flowfile and configure/enable &lt;STRONG&gt;&lt;EM&gt;DBCPConnectionPoolLookup&lt;/EM&gt;&lt;/STRONG&gt; service select this service in &lt;STRONG&gt;&lt;EM&gt;ExecuteSQL&lt;/EM&gt;&lt;/STRONG&gt; processor.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 02:53:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240250#M202056</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-01-13T02:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240251#M202057</link>
      <description>&lt;P&gt;This really helps--and its the solution that should work. However, every time i give the SQL SELECT statement in the flowfile content (using generateflowfile processor), the ExecuteSQL processor throws an error. The database.name attribute is set and the select statement is a simple &lt;/P&gt;&lt;P&gt;select a from table&lt;/P&gt;&lt;P&gt;the error is below. any idea what i'm missing?&lt;/P&gt;&lt;PRE&gt; [Timer-Driven Process Thread-5] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=15613b27-66e0-101a-ab78-86906b96182b] ExecuteSQL[id=15613b27-66e0-101a-ab78-86906b96182b] faile
d to process session due to org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=ed4af901-f621-4aab-b7db-aad8c72e41ca,claim=StandardContentClaim [resourceClaim=StandardResou
rceClaim[id=1547378310570-136, container=default, section=136], offset=890898, length=10357],offset=9267,name=ed4328e2-1284-4ff3-b252-f7de7c92a94e,size=1090] is not known in this session (StandardProcessSession[
id=315712]); Processor Administratively Yielded for 1 sec: org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=ed4af901-f621-4aab-b7db-aad8c72e41ca,claim=StandardContentCla
im [resourceClaim=StandardResourceClaim[id=1547378310570-136, container=default, section=136], offset=890898, length=10357],offset=9267,name=ed4328e2-1284-4ff3-b252-f7de7c92a94e,size=1090] is not known in this session (StandardProcessSession[id=315712])


&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Jan 2019 22:11:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240251#M202057</guid>
      <dc:creator>azure</dc:creator>
      <dc:date>2019-01-13T22:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240252#M202058</link>
      <description>&lt;P&gt;The solution worked! I had some strange error my side that disappeared after a clean setup of the flow. Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 18:41:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240252#M202058</guid>
      <dc:creator>azure</dc:creator>
      <dc:date>2019-01-21T18:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240253#M202059</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/103384/azure.html" nodeid="103384"&gt;@Yasir Khokhar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you please upload the template xml. I have similar requirement and it will help me start with.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 05:33:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/240253#M202059</guid>
      <dc:creator>Siddhanta</dc:creator>
      <dc:date>2019-08-02T05:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Multiple databases , same query, how do pass database name to the connection string?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/294322#M217189</link>
      <description>&lt;P&gt;I have written a blog on this,&amp;nbsp; Kindly refer to blog to setup dbcp connection pool Lookup controller service and execute same query in multiple databases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please follow this link, it is with an example with step by step instructions to setup the same:&lt;/P&gt;&lt;P&gt;&lt;A title="DBCPConnectionPoolLookup with multiple databases" href="https://bigdata-galaxy.blogspot.com/2020/04/nifi-querying-multiple-databases-using.html" target="_self"&gt;https://bigdata-galaxy.blogspot.com/2020/04/nifi-querying-multiple-databases-using.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 05:42:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-databases-same-query-how-do-pass-database-name/m-p/294322#M217189</guid>
      <dc:creator>DMishra</dc:creator>
      <dc:date>2020-04-20T05:42:21Z</dc:date>
    </item>
  </channel>
</rss>

