<?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: Read and convert with custom  Schema csv with binary delimiter in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397717#M249958</link>
    <description>&lt;P&gt;Yes, CSV Format is Custom Format&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 12:41:16 GMT</pubDate>
    <dc:creator>AndreyDE</dc:creator>
    <dc:date>2024-11-19T12:41:16Z</dc:date>
    <item>
      <title>Nifi: Read and convert with custom  Schema csv with binary delimiter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397696#M249952</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;The source csv file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 123456TextValue1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 654321TextValue2&lt;/P&gt;&lt;P&gt;where 123456 and TextValue1 are different values, separated by binary delimiter (\u0001)&lt;/P&gt;&lt;P&gt;Similar, 654321 and TextValue2&amp;nbsp; &amp;nbsp;have non-visible at Web-UI binary delimiter&amp;nbsp;(\u0001)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use ConvertRecord for updating the delimiter from "\u0001" to ";"&lt;/P&gt;&lt;P&gt;RecordReader is CSVReader with the following properties:&lt;/P&gt;&lt;P&gt;- Schema Access Strategy: Use 'Schema Text' Property&lt;BR /&gt;- Schema Text: #{test_schema}&lt;BR /&gt;- Value Separator: \u0001&lt;BR /&gt;- Treat First Line as Header: false&lt;BR /&gt;- Ignore CSV Header Column Names: true&lt;/P&gt;&lt;P&gt;RecordWriter is CSVRecordSetWriter:&lt;/P&gt;&lt;P&gt;- Schema Access Strategy: Use 'Schema Text' Property&lt;BR /&gt;- Schema Text: #{test_schema}&lt;BR /&gt;- Value Separator:&amp;nbsp; &amp;nbsp;;&lt;BR /&gt;- Include Header Line: true&lt;/P&gt;&lt;P&gt;test_schema is&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"type": "record",&lt;BR /&gt;"name": "test_schema",&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"name": "FIELD_1",&lt;BR /&gt;"type": ["int","null"],&lt;BR /&gt;"description": "FIELD_1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "FIELD_2",&lt;BR /&gt;"type": ["string","null"],&lt;BR /&gt;"description": "FIELD_2"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Expected output is:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FIELD_1;FIELD_2;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123456;TextValue1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 654321;TextValue2&lt;/P&gt;&lt;P&gt;But I got the following error:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR&lt;BR /&gt;ConvertRecord[id=01931001-0d7e-1e43-146d-1a380e6d43b7] Failed to process FlowFile[filename=7365b509-7100-4bc2-a070- 4cc8ce8377b9]; will route to failure: org.apache.nifi.processor.exception.ProcessException: Could not parse incoming data&lt;BR /&gt;Caused by: org.apache.nifi.serialization.MalformedRecordException: Error while getting next record&lt;BR /&gt;Caused by: java.lang.NumberFormatException: For input string: "123456TextValue1"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 09:31:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397696#M249952</guid>
      <dc:creator>AndreyDE</dc:creator>
      <dc:date>2024-11-19T09:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Read and convert with custom  Schema csv with binary delimiter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397708#M249954</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/119091"&gt;@AndreyDE&lt;/a&gt;&amp;nbsp;Thank you for posting your query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per the&amp;nbsp;&lt;SPAN&gt;CSVReader&lt;/SPAN&gt;&amp;nbsp;docs:&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-record-serialization-services-nar/1.27.0/org.apache.nifi.csv.CSVReader/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-record-serialization-services-nar/1.27.0/org.apache.nifi.csv.CSVReader/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The property&amp;nbsp;&lt;STRONG&gt;Value Separator&amp;nbsp;&lt;/STRONG&gt;only considered if the&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;[CSV Format] Property has a value of "Custom Format".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Does your&amp;nbsp;&lt;STRONG&gt;CSV Format&amp;nbsp;&lt;/STRONG&gt;is set with "Custom Format" ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 10:55:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397708#M249954</guid>
      <dc:creator>satz</dc:creator>
      <dc:date>2024-11-19T10:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Read and convert with custom  Schema csv with binary delimiter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397717#M249958</link>
      <description>&lt;P&gt;Yes, CSV Format is Custom Format&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 12:41:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Read-and-convert-with-custom-Schema-csv-with-binary/m-p/397717#M249958</guid>
      <dc:creator>AndreyDE</dc:creator>
      <dc:date>2024-11-19T12:41:16Z</dc:date>
    </item>
  </channel>
</rss>

