<?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: Loading csv files into Oracle DB with NiFi in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119943#M51088</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/77018/loading-csv-files-into-oracle-db-with-nifi.html#"&gt;@Joshua Adeleke&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also check your NiFi app log for any Out Of Memory Errors (OOME).  The SplitText processor may be having memory issues trying to split over 40k records.  You could try using two splitText processors in series with the first splitting on a 10,000 "Line Split Count" and the second then splitting those 10,000 line FlowFiles with a 1 "Line Split Count".  This will greatly reduce the heap memory footprint.&lt;/P&gt;&lt;P&gt;In addition, if you do a listing on the queue feeding your putSQL processor, do you see any listed FlowFiles with an unexpected size?&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 22:15:41 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2017-01-09T22:15:41Z</dc:date>
    <item>
      <title>Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119941#M51086</link>
      <description>&lt;P&gt;I have a flow diagram that picks zipped csv files and loads into a table in Oracle 12c. This has been tested successfully for 20 records but when i try it with a larger csv file (over 40k records), i get an error message &lt;EM&gt;&lt;STRONG&gt;"Failed to update DB due to a failed batch update. There were a total of 1 flowfiles that failed, 0 that succeeded and 99 that were not executed and will be routed to retry;"&lt;/STRONG&gt;&lt;/EM&gt;. I currently have the batch size set to 100 for the PutSQL processor. Is there any setting i am missing?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;GetSFTP---UnpackContent---SplitText---ExtractText---ReplaceText---PutSQL&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 18:04:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119941#M51086</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-09T18:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119942#M51087</link>
      <description>&lt;P&gt;Can you check the logs (in logs/nifi-app.log) to see what the error was?  Also, what is the content of the first flow file to go into PutSQL (that is being routed to failure)? Does that SQL statement work when executed from something like SQL Developer?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 21:44:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119942#M51087</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-01-09T21:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119943#M51088</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/77018/loading-csv-files-into-oracle-db-with-nifi.html#"&gt;@Joshua Adeleke&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also check your NiFi app log for any Out Of Memory Errors (OOME).  The SplitText processor may be having memory issues trying to split over 40k records.  You could try using two splitText processors in series with the first splitting on a 10,000 "Line Split Count" and the second then splitting those 10,000 line FlowFiles with a 1 "Line Split Count".  This will greatly reduce the heap memory footprint.&lt;/P&gt;&lt;P&gt;In addition, if you do a listing on the queue feeding your putSQL processor, do you see any listed FlowFiles with an unexpected size?&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:15:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119943#M51088</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-01-09T22:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119944#M51089</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt&lt;/A&gt;, there is no OOME error in the NiFi app log. Also, the SplitText processor is able to successfully split the files but the issue seems to be at the PutSQL processor. I can see that although i asked that SplitText processor skip 2 lines in the header line count parameter, the insert statements into the PutSQL have the csv file headers as the values.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 18:15:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119944#M51089</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-10T18:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119945#M51090</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641"&gt;@Matt Burgess&lt;/A&gt;, the first SQL statement is the issue. I see it's taking the headers in the csv file even though i skipped the headers with the header line count parameter in SplitText. &lt;/P&gt;&lt;PRE&gt;2017-01-10 12:07:13,538 ERROR [Timer-Driven Process Thread-40] o.apache.nifi.processors.standard.PutSQL PutSQL[id=79bf32ff-e154-1a02-b109-ebd298dfab2e] Failed to update database due to a failed batch update. There were a total of 1 FlowFiles that failed, 0 that succeeded, and 99 that were not execute and will be routed to retry;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2017 19:25:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119945#M51090</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-10T19:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119946#M51091</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3938/joshuaadeleke.html" nodeid="3938"&gt;@Joshua Adeleke&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You could extract the header bits from the first two lines into FlowFile attributes before the SplitText processor. All the FlowFiles that come out of the SplitText processor will all get these new FlowFile attributes as well. You can then use the FlowFile Attributes in your PutSQL.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 21:40:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119946#M51091</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-01-10T21:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119947#M51092</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please how do i extract the headers without using the SplitText processor?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 02:28:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119947#M51092</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-11T02:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119948#M51093</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3938/joshuaadeleke.html" nodeid="3938"&gt;@Joshua Adeleke&lt;/A&gt; &lt;/P&gt;&lt;P&gt;The SplitText processor simply splits the content of an incoming FlowFile into multiple FlowFiles.  It gives you the ability to designate how many lines would be considered the header and ignored, but it does no extraction of content in to FlowFile attributes.&lt;/P&gt;&lt;P&gt;The ExtractText processor can be used to read parts of the content and assign those parts to different NiFi FlowFile attributes.  It will not remove the header form the content, that would still be done during the splitText processor operation.  However, every FlowFile created by SplitText will inherit the unique FlowFile attributes from the parent FlowFile.&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 02:46:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119948#M51093</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-01-11T02:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119949#M51094</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3938/joshuaadeleke.html" nodeid="3938"&gt;@Joshua Adeleke&lt;/A&gt; &lt;/P&gt;&lt;P&gt;If you found this information helpful in guiding you with your dataflow design, please accept the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 03:03:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119949#M51094</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-01-11T03:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119950#M51095</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have not found a way to remove the headers in the csv file.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 18:01:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119950#M51095</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-11T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119951#M51096</link>
      <description>&lt;P&gt;I used the fragment.index attribute to remove the headers and successfully loaded into Oracle DB. Thank you &lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641"&gt;@Matt Burgess&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 20:57:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119951#M51096</guid>
      <dc:creator>joshua_adeleke</dc:creator>
      <dc:date>2017-01-11T20:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119952#M51097</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3938/joshuaadeleke.html" nodeid="3938"&gt;@Joshua Adeleke&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Another option might be to use the ReplaceText processor to find the first two lines and replace them with nothing.  Glad to hear you got things working for you.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 21:29:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119952#M51097</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-01-11T21:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loading csv files into Oracle DB with NiFi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119953#M51098</link>
      <description>&lt;P&gt;you just copy the query generated in any one of the output flowfile of the ReplaceText processor and execute that in Oracle DB.If it is executed successfully in DB here also will execute.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 16:59:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-csv-files-into-Oracle-DB-with-NiFi/m-p/119953#M51098</guid>
      <dc:creator>prabhuu161994</dc:creator>
      <dc:date>2017-03-09T16:59:02Z</dc:date>
    </item>
  </channel>
</rss>

