<?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 a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/300579#M220300</link>
    <description>&lt;P&gt;hey Guys , quick one. With the infer schema approach now being available , do we need to have the avro registry ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jul 2020 03:36:22 GMT</pubDate>
    <dc:creator>abhinav_joshi</dc:creator>
    <dc:date>2020-07-30T03:36:22Z</dc:date>
    <item>
      <title>Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222678#M184548</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62492-3.png" style="width: 1139px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15667i8C19F7E215D9A6A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62492-3.png" alt="62492-3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a simple CSV file and the content of the file is as follows:&lt;/P&gt;&lt;PRE&gt;1,QWER
2,TYUI
3,ASDF
4,GHJK
5,ZXCV &lt;/PRE&gt;&lt;P&gt;I want to move the content of this file into a MYSQL table, hence i have created a the following flow (refer to 1.png)&lt;/P&gt;&lt;P&gt;I have configured the PutDatabaseRecord processor as (refer 2.png )&lt;/P&gt;&lt;P&gt;Also, the CSVReader looks like (refer 3.png)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62490-2.png" style="width: 1149px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15668iE97E4721032F03A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62490-2.png" alt="62490-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62489-1.png" style="width: 522px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15669i28ECE550F7E7BFD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62489-1.png" alt="62489-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am getting error refer 4.png&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62491-4.png" style="width: 1280px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15670i90CA0CE342595756/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62491-4.png" alt="62491-4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you help me configure my CSVReader I guess its because of it I am not able to push my csv records in to mysql table&lt;BR /&gt;Any help is appreciated. &lt;/P&gt;&lt;P&gt;Reference link:&lt;BR /&gt;&lt;A href="https://community.hortonworks.com/questions/102559/please-suggest-me-stepshow-i-can-insert-csv-filein.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://community.hortonworks.com/questions/102559/please-suggest-me-stepshow-i-can-insert-csv-filein.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:03:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222678#M184548</guid>
      <dc:creator>Kunal.Gaikwad</dc:creator>
      <dc:date>2019-08-18T02:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222679#M184549</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1962/aryankunal.html" nodeid="1962" target="_blank"&gt;@Kunal Gaikwad&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I used PutDatabaseRecord with a CSVReader, but have a slightly different flow that uses an UpdateAttribute processor to set the schema.  So the flow is GetFile--&amp;gt;UpdateAttribute--&amp;gt;PutDatabaseRecord.  Here it is as an attachment:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/62503-csv-to-mysql.xml" target="_blank"&gt;csv-to-mysql.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;UpdateAttribute adds the attribute "schema.name" with the value of "test".&lt;/P&gt;&lt;P&gt;CSVReader:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62504-csvreader.png" style="width: 771px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15663i310BC1D212C96D5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62504-csvreader.png" alt="62504-csvreader.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;AvroSchemaRegistry:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62505-avroschemaregistry.png" style="width: 769px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15664i645DB3F9715FA57C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62505-avroschemaregistry.png" alt="62505-avroschemaregistry.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PutDatabaseRecord:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62507-putdbrecord.png" style="width: 753px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15665iABAF9B6C2FBEBEC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62507-putdbrecord.png" alt="62507-putdbrecord.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here are the results in my database:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62511-mysql-db.png" style="width: 800px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15666i81DFF8F27EF2D51E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62511-mysql-db.png" alt="62511-mysql-db.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:03:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222679#M184549</guid>
      <dc:creator>alim</dc:creator>
      <dc:date>2019-08-18T02:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222680#M184550</link>
      <description>&lt;P&gt;@AndrewLim&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Worked like a charm. Looking at your response, I figured that I never defined schema.name and hence the errors! Thank you for the prompt response!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 13:43:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222680#M184550</guid>
      <dc:creator>Kunal.Gaikwad</dc:creator>
      <dc:date>2018-02-23T13:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222681#M184551</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1962/aryankunal.html" nodeid="1962"&gt;@Kunal Gaikwad&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Great!  Glad you got your flow working.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 22:44:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222681#M184551</guid>
      <dc:creator>alim</dc:creator>
      <dc:date>2018-02-23T22:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222682#M184552</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3943/alim.html" nodeid="3943"&gt;@Andrew Lim&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/1962/aryankunal.html" nodeid="1962"&gt;@Kunal Gaikwad&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have tried the workflow (csv-to-mysql.xml) that you've attached. My use case is to insert few rows into teradata instead of mysql.&lt;BR /&gt;I've kept everything same as yours, just that the table name in Teradata (&lt;STRONG&gt;bigdata_dl.acct&lt;/STRONG&gt;), DBCP Connection Pool for Teradata and datatype in Teradata is different.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But, I am getting the below error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;org.apache.nifi.schema.acess.SchemaNotFoundException:Unable to find schema with name 'bigdata_dl.acct'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/93076-error.jpeg"&gt;error.jpeg&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I've created the table in teradata before running the workflow:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/93077-2.png"&gt;2.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is how the UpdateAttribute processor looks like:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/93078-1.jpeg"&gt;1.jpeg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is how CSVReader looks like:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/93079-3.jpeg"&gt;3.jpeg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is how AvroSchemaRegistry looks like:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/93080-4.jpeg"&gt;4.jpeg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if I provide the "test" field in the AvroSchemaRegistry as below (to match the datatype in Teradata as it doesn't supports long or string) it shows me State as Invalid stating not a valid Avro Schema: Illegal character in: varcher(30)&lt;/P&gt;&lt;P&gt;{
  "type": "record", &lt;/P&gt;&lt;P&gt;   "name": "TestRecord", &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;  "fields" : [&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
  {"name": "ACCT_ID", "type": "varchar(30)"}, &lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;  {"name": "ACCT_NAME", "type": "varchar(30)"}&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
  ]&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;}&lt;/P&gt;&lt;P&gt;This is how PutDatabaseRecord looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG style="color: rgb(51, 51, 51);" /&gt;&lt;/P&gt;&lt;P&gt;Please advise. Appreciate your help! Happy Halloween &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 11:55:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222682#M184552</guid>
      <dc:creator>rishisaxena2018</dc:creator>
      <dc:date>2018-11-01T11:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222683#M184553</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/97694/rishisaxena20182018.html" nodeid="97694"&gt;@nifi_is_awesome&lt;/A&gt;&lt;P&gt;FYI, It is better to start a new question, referencing this question, rather than adding a new question via an answer here.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:40:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/222683#M184553</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2018-11-01T21:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/287565#M213109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed your step.But i am getting error "due to record does not have value for the required column CURRENT_CONNECTION "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Mysql schema and database are same.&lt;/P&gt;&lt;P&gt;In your example what is test_db and what is test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling on this on last 3 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 04:31:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/287565#M213109</guid>
      <dc:creator>jaypee</dc:creator>
      <dc:date>2020-01-14T04:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/300579#M220300</link>
      <description>&lt;P&gt;hey Guys , quick one. With the infer schema approach now being available , do we need to have the avro registry ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 03:36:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/300579#M220300</guid>
      <dc:creator>abhinav_joshi</dc:creator>
      <dc:date>2020-07-30T03:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a simple CSV file using nifi(PutDatabaseRecord and CSVReader) causing error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/302131#M221000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/73204"&gt;@jaypee&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm also facing a similar issue, is yours resolved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shivansh&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 05:33:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/m-p/302131#M221000</guid>
      <dc:creator>ShivanshT</dc:creator>
      <dc:date>2020-08-31T05:33:01Z</dc:date>
    </item>
  </channel>
</rss>

