<?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 Index for header 'filename' is 1 but CSVRecord only has 1 values error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347433#M235165</link>
    <description>&lt;P&gt;Hello. I am simply spliting a csv file into two based on their row values. and when I run it through the QueryRecord processor, I get the error below. What could be the possible fix for this? Sample csv is as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GradeNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;CattleBreedNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;CattleGenderNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Price&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;beef_cattle&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;10094&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;hanwoo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;12001&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;beef_cattle&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;Male&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;12704&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;B++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;milk_cow&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;16942&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The error&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="화면 캡처 2022-07-13 091701.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34851i8BDD5FFB99D89CE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="화면 캡처 2022-07-13 091701.png" alt="화면 캡처 2022-07-13 091701.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 13 Jul 2022 00:25:34 GMT</pubDate>
    <dc:creator>Lewis_King</dc:creator>
    <dc:date>2022-07-13T00:25:34Z</dc:date>
    <item>
      <title>Index for header 'filename' is 1 but CSVRecord only has 1 values error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347433#M235165</link>
      <description>&lt;P&gt;Hello. I am simply spliting a csv file into two based on their row values. and when I run it through the QueryRecord processor, I get the error below. What could be the possible fix for this? Sample csv is as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GradeNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;CattleBreedNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;CattleGenderNm&amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Price&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;beef_cattle&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;10094&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;hanwoo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;12001&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;beef_cattle&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;Male&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;12704&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;B++&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;SPAN&gt;milk_cow&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;Female&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN&gt;16942&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The error&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="화면 캡처 2022-07-13 091701.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34851i8BDD5FFB99D89CE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="화면 캡처 2022-07-13 091701.png" alt="화면 캡처 2022-07-13 091701.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Jul 2022 00:25:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347433#M235165</guid>
      <dc:creator>Lewis_King</dc:creator>
      <dc:date>2022-07-13T00:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Index for header 'filename' is 1 but CSVRecord only has 1 values error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347438#M235169</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99150"&gt;@Lewis_King&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error means that some line(s) in your flowfile have less than 4 fields. Empty lines are typically ignored but if you have a trailing line, for example, with a space in it, that space will be interpreted as the first field (&lt;SPAN&gt;GradeNm) and the other fields will be missing, which could lead to this sort of problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Check your input file for trailing lines or lines with less than 3 commas in it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the problem is being caused by a blank line with spaces, for example, you could use the ReplaceText processor to remove those spaces, as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="araujo_0-1657678374647.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34852i07ACA9801151D2B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="araujo_0-1657678374647.png" alt="araujo_0-1657678374647.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;André&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 02:30:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347438#M235169</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-07-13T02:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Index for header 'filename' is 1 but CSVRecord only has 1 values error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347439#M235170</link>
      <description>&lt;P&gt;Thank you so much for the help! this solved my problem&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 02:28:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Index-for-header-filename-is-1-but-CSVRecord-only-has-1/m-p/347439#M235170</guid>
      <dc:creator>Lewis_King</dc:creator>
      <dc:date>2022-07-13T02:28:44Z</dc:date>
    </item>
  </channel>
</rss>

