<?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 NPE with InferAvroSchema in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NPE-with-InferAvroSchema/m-p/386901#M246184</link>
    <description>&lt;P&gt;I am observing following error for one of my nifi data flow:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;o.a.nifi.processors.kite.InferAvroSchema InferAvroSchema[id=9fa25adc-91da-31e3-97ff-d5012c68588c] Failed to infer Avro schema for StandardFlowFileRecord[uuid=a8cf241e-8804-4177-837f-f832657sa596,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1713770110449-11, container=default, section=11], offset=0, length=44],offset=0,name=iSAM_ontEthPort.csv,size=44] due to java.lang.NullPointerException: No content to infer schema: java.lang.NullPointerException: No content to infer schema

java.lang.NullPointerException: No content to infer schema&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What to make out of it?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2024 07:52:32 GMT</pubDate>
    <dc:creator>manishg</dc:creator>
    <dc:date>2024-04-22T07:52:32Z</dc:date>
    <item>
      <title>NPE with InferAvroSchema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NPE-with-InferAvroSchema/m-p/386901#M246184</link>
      <description>&lt;P&gt;I am observing following error for one of my nifi data flow:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;o.a.nifi.processors.kite.InferAvroSchema InferAvroSchema[id=9fa25adc-91da-31e3-97ff-d5012c68588c] Failed to infer Avro schema for StandardFlowFileRecord[uuid=a8cf241e-8804-4177-837f-f832657sa596,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1713770110449-11, container=default, section=11], offset=0, length=44],offset=0,name=iSAM_ontEthPort.csv,size=44] due to java.lang.NullPointerException: No content to infer schema: java.lang.NullPointerException: No content to infer schema

java.lang.NullPointerException: No content to infer schema&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What to make out of it?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 07:52:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NPE-with-InferAvroSchema/m-p/386901#M246184</guid>
      <dc:creator>manishg</dc:creator>
      <dc:date>2024-04-22T07:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: NPE with InferAvroSchema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NPE-with-InferAvroSchema/m-p/386942#M246194</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/106206"&gt;@manishg&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Not sure what version of Apache NiFi you are using here.&amp;nbsp; I would not recommend using the InferAvroSchema processor.&amp;nbsp; Depending on your use case there may be better options.&amp;nbsp; Most record reader like (&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-record-serialization-services-nar/1.25.0/org.apache.nifi.csv.CSVReader/index.html" target="_blank"&gt;CSVReader&lt;/A&gt;) have that ability in infer schema&lt;BR /&gt;&lt;BR /&gt;From the output provided you have a CSV file that is 44 bytes in size.&amp;nbsp; According to the InferAvroSchema processor documentation:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;When inferring from CSV data a "header definition" must be present either as the first line of the incoming data or the "header definition" must be explicitly set in the property "CSV Header Definition". A "header definition" is simply a single comma separated line defining the names of each column. The "header definition" is required in order to determine the names that should be given to each field in the resulting Avro definition.&lt;/LI-CODE&gt;&lt;P&gt;Does your content here meet the requirements of the InferAvroSchema processor?&lt;BR /&gt;Do you see same issue if you try to infer schema via the CSVReader controller service?&lt;BR /&gt;&lt;BR /&gt;These two different components do not infer schema in the same way.&amp;nbsp; &amp;nbsp;The InferAvroSchema is not part of the Apache NiFi and utilizes the Kite SDK which is no longer being maintained.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 13:13:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NPE-with-InferAvroSchema/m-p/386942#M246194</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-04-22T13:13:25Z</dc:date>
    </item>
  </channel>
</rss>

