<?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: How to enter CSV file content and meta data into single table of postgresql database by NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289762#M214449</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/63257"&gt;@vikrant_kumar24&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Looking over your most recent post it appears that&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;solved your issue. Once you've had a chance to try out the files he's provided, can you confirm by using the &lt;EM&gt;Accept as Solution&lt;/EM&gt; button which can be found at the bottom of his reply so it can be of assistance to others?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" style="width: 338px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25872iD123BA28D098C022/image-size/large?v=v2&amp;amp;px=999" role="button" title="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" alt="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2020 00:19:25 GMT</pubDate>
    <dc:creator>ask_bill_brooks</dc:creator>
    <dc:date>2020-02-14T00:19:25Z</dc:date>
    <item>
      <title>NiFi: How to enter CSV file content and meta data into single table of postgresql database by NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289589#M214356</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have csv files and I want to move the content of files along with its meta data (File name, source (To be hard coded), control number (Part of file name - to be extracted from file name itself) thru NiFi. So here is the sample File name and layout -&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;File name -&lt;/STRONG&gt; 12345_user_data.csv (control_number_user_data.csv)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;source -&lt;/STRONG&gt; Newyork&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CSV File Content/columns -&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Fields - abc1, abc2, abc3, abc4&amp;nbsp;&lt;/P&gt;
&lt;P&gt;values - 1,2,3,4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Postgres Database table layout&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Table name - User_Education&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;fields name&amp;nbsp; - &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;control_number, file_name, source,&amp;nbsp;abc1, abc2, abc3, abc4&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Values -&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;12345,&amp;nbsp;12345_user_data.csv, Newyork, 1,2,3,4&lt;/P&gt;
&lt;P&gt;I am planning to use below processors -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ListFile&lt;/P&gt;
&lt;P&gt;FetchFile&lt;/P&gt;
&lt;P&gt;UpdateAttributes&lt;/P&gt;
&lt;P&gt;PutDatabaseRecords&lt;/P&gt;
&lt;P&gt;LogAttributes&lt;/P&gt;
&lt;P&gt;But I am not sure how to combine the actual content with the meta data to load into one single table. Please help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 07:31:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289589#M214356</guid>
      <dc:creator>vikrant_kumar24</dc:creator>
      <dc:date>2020-02-12T07:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: How to enter CSV file content and meta data into single table of postgresql database by NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289629#M214379</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/63257"&gt;@vikrant_kumar24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are many ways to do this. &amp;nbsp; I have added a template to my NiFI templates for you. &amp;nbsp;This way takes a csv Input, splits the lines, extracts two columns, builds an insert statement, and executes that statement (requires database connection pool controller service).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only real tricky part to this is the regex for mapping the columns in ExtractText Processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/steven-dfheinz/NiFi-Templates" target="_blank" rel="noopener"&gt;https://github.com/steven-dfheinz/NiFi-Templates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you are able to parse the csv to attributes, adding more attributes for metadata, and adding those details to the insert query should be very easy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps get you started. &amp;nbsp; Additionally, if you search here, you will find loads of posts with all the other suggested methods for processing csv to sql.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 13:17:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289629#M214379</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-02-12T13:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: How to enter CSV file content and meta data into single table of postgresql database by NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289745#M214437</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 20:05:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289745#M214437</guid>
      <dc:creator>vikrant_kumar24</dc:creator>
      <dc:date>2020-02-13T20:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: How to enter CSV file content and meta data into single table of postgresql database by NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289762#M214449</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/63257"&gt;@vikrant_kumar24&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Looking over your most recent post it appears that&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;solved your issue. Once you've had a chance to try out the files he's provided, can you confirm by using the &lt;EM&gt;Accept as Solution&lt;/EM&gt; button which can be found at the bottom of his reply so it can be of assistance to others?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" style="width: 338px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25872iD123BA28D098C022/image-size/large?v=v2&amp;amp;px=999" role="button" title="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" alt="cloudera community accept solution button created 2019-12-14_19-46-50.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 00:19:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-enter-CSV-file-content-and-meta-data-into-single/m-p/289762#M214449</guid>
      <dc:creator>ask_bill_brooks</dc:creator>
      <dc:date>2020-02-14T00:19:25Z</dc:date>
    </item>
  </channel>
</rss>

