<?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 ingest dynamic csv file into postgresql in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236648#M198461</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;&lt;/A&gt;Greate! It work well. Tank you&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 12:35:30 GMT</pubDate>
    <dc:creator>jjd0822</dc:creator>
    <dc:date>2018-11-26T12:35:30Z</dc:date>
    <item>
      <title>NIFI-How to ingest dynamic csv file into postgresql</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236646#M198459</link>
      <description>&lt;P&gt;I was working with NIFI to ingest csv file into postgresql. But I have many different csv file so cannot define specific avro schema. So I use inferavroschema processor. But there is some problem&lt;/P&gt;&lt;P&gt;1. I have to ingest csv file which have timestamp type column. But when I run inferavroschema processor, it define the type of column as string&lt;/P&gt;&lt;P&gt;2. If first row of column is null, processor define the type of column as string, even though its original type is integer or double&lt;/P&gt;&lt;DIV&gt;So what I figured out was to retrieve the avroschema from the table in the database using the filename, but I do not know if there is a processor that does this. Can anyone help me with this?&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Nov 2018 12:27:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236646#M198459</guid>
      <dc:creator>jjd0822</dc:creator>
      <dc:date>2018-11-23T12:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI-How to ingest dynamic csv file into postgresql</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236647#M198460</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/99461/jjd0822.html" nodeid="99461"&gt;@Jeong Jong-Duk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Using external Database:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;LookupRecord/LookupAttribute/SelectHiveQL/FetchHbase&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; processor available in NiFi as you can setup lookupservice then you are able to retrieve the avro schema from Database.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Using NiFi processors:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can add Avro schema attribute by using NiFi &lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;UpdateAttribute&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt; &lt;STRONG&gt;Advanced usage&lt;/STRONG&gt; by checking the &lt;STRONG&gt;filename&lt;/STRONG&gt; you can add the appropriate avro schema as the flowfile attribute then in your Record Reader/Writer controller services uses that schema.&lt;/P&gt;&lt;P&gt;This is basically a &lt;STRONG&gt;case statement in UpdateAttribute &lt;/STRONG&gt;processor based on &lt;STRONG&gt;filename&lt;/STRONG&gt; we are making decision which &lt;STRONG&gt;schema we need to add to the flowfile,&lt;/STRONG&gt; you need to define schema with  &lt;STRONG&gt;avro logical type(timestamo)&lt;/STRONG&gt; and configure &lt;STRONG&gt;record reader/writer controller services&lt;/STRONG&gt; with the&lt;STRONG&gt; timestamp/time/date&lt;/STRONG&gt; formats so that processor can read/write the flowfile content to postgressql.&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://community.hortonworks.com/questions/141774/how-to-generate-a-variable-under-conditions-for-an.html" target="_blank"&gt;this&lt;/A&gt; link to configure and usage of UpdateAttribute Advanced usage.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 03:57:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236647#M198460</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-11-24T03:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI-How to ingest dynamic csv file into postgresql</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236648#M198461</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;&lt;/A&gt;Greate! It work well. Tank you&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 12:35:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-How-to-ingest-dynamic-csv-file-into-postgresql/m-p/236648#M198461</guid>
      <dc:creator>jjd0822</dc:creator>
      <dc:date>2018-11-26T12:35:30Z</dc:date>
    </item>
  </channel>
</rss>

