<?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: Need a processor to test if a table sql exists and return the flowfile in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Need-a-processor-to-test-if-a-table-sql-exists-and-return/m-p/176556#M138806</link>
    <description>&lt;P&gt;As of NiFi 1.5.0 (via &lt;A href="https://issues.apache.org/jira/browse/NIFI-4522" target="_blank"&gt;NIFI-4522&lt;/A&gt;), you can issue a SQL query in &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.7.0/org.apache.nifi.processors.standard.PutSQL/index.html" target="_blank"&gt;PutSQL&lt;/A&gt; while still retaining the incoming flow file contents. For your case, you could send the CSV file to PutSQL and execute a "CREATE TABLE IF NOT EXISTS" statement, which will create the table the first time but allow the CSV to proceed to the "real" destination processor, likely &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.7.0/org.apache.nifi.processors.standard.PutDatabaseRecord/index.html" target="_blank"&gt;PutDatabaseRecord&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 22:06:16 GMT</pubDate>
    <dc:creator>mburgess</dc:creator>
    <dc:date>2018-06-29T22:06:16Z</dc:date>
  </channel>
</rss>

