<?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 Unable to read topic containing a csv file with one row and no headers in Nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350228#M235926</link>
    <description>&lt;P&gt;I am trying to read a kafka topic that contains a csv file with no headers. The file is read as it should be when the csv contains two rows or more (no headers) but when I use a csv file with only one row (no headers)&amp;nbsp;the processor Read from Kafka doesn't do anything (no error message, and no file ingested. (0 in 0 out)&lt;/P&gt;&lt;P&gt;The controller services show below are :&amp;nbsp;&lt;/P&gt;&lt;P&gt;- &lt;SPAN&gt;CSVReader&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csv reader.PNG" style="width: 920px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35183i9DD9D144E35EE3E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="csv reader.PNG" alt="csv reader.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CSVRecordSetWriter :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="record writer.PNG" style="width: 874px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35184i4C8A8F52D925CA01/image-size/large?v=v2&amp;amp;px=999" role="button" title="record writer.PNG" alt="record writer.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 12:40:41 GMT</pubDate>
    <dc:creator>Omarb</dc:creator>
    <dc:date>2022-08-17T12:40:41Z</dc:date>
    <item>
      <title>Unable to read topic containing a csv file with one row and no headers in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350228#M235926</link>
      <description>&lt;P&gt;I am trying to read a kafka topic that contains a csv file with no headers. The file is read as it should be when the csv contains two rows or more (no headers) but when I use a csv file with only one row (no headers)&amp;nbsp;the processor Read from Kafka doesn't do anything (no error message, and no file ingested. (0 in 0 out)&lt;/P&gt;&lt;P&gt;The controller services show below are :&amp;nbsp;&lt;/P&gt;&lt;P&gt;- &lt;SPAN&gt;CSVReader&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csv reader.PNG" style="width: 920px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35183i9DD9D144E35EE3E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="csv reader.PNG" alt="csv reader.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CSVRecordSetWriter :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="record writer.PNG" style="width: 874px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35184i4C8A8F52D925CA01/image-size/large?v=v2&amp;amp;px=999" role="button" title="record writer.PNG" alt="record writer.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 12:40:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350228#M235926</guid>
      <dc:creator>Omarb</dc:creator>
      <dc:date>2022-08-17T12:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read topic containing a csv file with one row and no headers in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350530#M236006</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99880"&gt;@Omarb&lt;/a&gt;&amp;nbsp; &amp;nbsp;Not sure if this is helpful, but sometimes I do something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take the operational test, write the schema, then capture it from one of your tests (check attributes for the schema).&amp;nbsp; &amp;nbsp;Now re-use that schema object for the non-operational test instead of infer-schema.&amp;nbsp; &amp;nbsp; I only like to infer schema to help me write the schema, especially if complicated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 13:38:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350530#M236006</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2022-08-22T13:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read topic containing a csv file with one row and no headers in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350991#M236111</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99880"&gt;@Omarb&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Initially I thought this was a problem with the CSVRecordSetWriter, but I was mistaken.&lt;/P&gt;&lt;P&gt;The issue here is that even though your CSVReader is set to ignore the header line, it has Schema Access Strategy set to "Infer Schema", and this will cause the reader to consume the first line of the flow file to infer the schema, even though the other property tells it to ignore it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To avoid this, set the Schema Access Strategy property to "&lt;SPAN&gt;Use 'Schema Text' Property&lt;/SPAN&gt;" and provide a schema that matches your flowfile structure. For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; "type": "record",
 "name": "MyFlowFile",
 "fields": [
  { "name": "col_a", "type": "string" },
  { "name": "col_b", "type": "string" },
  { "name": "col_c", "type": "string" },
  ...
 ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will stop the first line being "consumed" by the reader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2022 05:15:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/350991#M236111</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-27T05:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to read topic containing a csv file with one row and no headers in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/351496#M236287</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99880"&gt;@Omarb&lt;/a&gt;,&amp;nbsp;Has any of the replies helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 05:29:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-read-topic-containing-a-csv-file-with-one-row-and/m-p/351496#M236287</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2022-09-05T05:29:28Z</dc:date>
    </item>
  </channel>
</rss>

