<?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 Am I Configuring NiFi's AvroSchemaRegistry Correctly in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210783#M172725</link>
    <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/39738-ccr-and-hdr-20.txt"&gt;ccr-and-hdr-20.txt&lt;/A&gt;Hello.&lt;/P&gt;&lt;P&gt;I am creating a WorkFlow to convert CSV to JSON, and I need help configuring ConvertRecords's JsonRecordSetWriter controller service. What is happening is that a SchemaNotFoundException is being thrown saying "Unable to find schema with name 'ccr' (The name I chose for the data).  The schema is inferred using "InferAvroSchema", and "UpdateAttribute" creates an atttributed named "schema.name" that is set to 'ccr'. The controller service "AvroSchemaRegistry" has a property added to it named "ccr" and the value for ths property is "${inferred.avro.schema}". InferAvroSchema's SchemaOutputDestination property is set to value "flowfile-attribute" meaning the inferred avro schema will be put into an attribute named "inferred.avro.schema".
I have attached the workflow and the csv data set. The processor's directory paths will need to be changed so that this workflow can be tested. Again I really need help in that I do not whan to have to specify the schema as text. Rather I would like the schema inferred so that I can have CSV files of differing header and data content processed by the same workflow. Any help and guidance you can share with me I would greatly appreciate it. Note that the CSV file's extension has been changed to ".txt" and as such will need to be changed back to ".csv".&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/39737-csv-to-json-to-es5-with-id-csvreader.xml"&gt;csv-to-json-to-es5-with-id-csvreader.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Respectively,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 02:54:46 GMT</pubDate>
    <dc:creator>pmaggiulli</dc:creator>
    <dc:date>2017-10-13T02:54:46Z</dc:date>
    <item>
      <title>Am I Configuring NiFi's AvroSchemaRegistry Correctly</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210783#M172725</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/39738-ccr-and-hdr-20.txt"&gt;ccr-and-hdr-20.txt&lt;/A&gt;Hello.&lt;/P&gt;&lt;P&gt;I am creating a WorkFlow to convert CSV to JSON, and I need help configuring ConvertRecords's JsonRecordSetWriter controller service. What is happening is that a SchemaNotFoundException is being thrown saying "Unable to find schema with name 'ccr' (The name I chose for the data).  The schema is inferred using "InferAvroSchema", and "UpdateAttribute" creates an atttributed named "schema.name" that is set to 'ccr'. The controller service "AvroSchemaRegistry" has a property added to it named "ccr" and the value for ths property is "${inferred.avro.schema}". InferAvroSchema's SchemaOutputDestination property is set to value "flowfile-attribute" meaning the inferred avro schema will be put into an attribute named "inferred.avro.schema".
I have attached the workflow and the csv data set. The processor's directory paths will need to be changed so that this workflow can be tested. Again I really need help in that I do not whan to have to specify the schema as text. Rather I would like the schema inferred so that I can have CSV files of differing header and data content processed by the same workflow. Any help and guidance you can share with me I would greatly appreciate it. Note that the CSV file's extension has been changed to ".txt" and as such will need to be changed back to ".csv".&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/39737-csv-to-json-to-es5-with-id-csvreader.xml"&gt;csv-to-json-to-es5-with-id-csvreader.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Respectively,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 02:54:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210783#M172725</guid>
      <dc:creator>pmaggiulli</dc:creator>
      <dc:date>2017-10-13T02:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Am I Configuring NiFi's AvroSchemaRegistry Correctly</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210784#M172726</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/140399/am-i-configuring-nifis-avroschemaregistry-correctl.html#" rel="nofollow noopener noreferrer" target="_blank"&gt;@Patrick Maggiulli&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From the documentation of the AvroSchemaRegistry it looks like the actual schema should be given to the registry:&lt;/P&gt;&lt;PRE&gt;'value' represents the textual representation of the actual schema following the syntax and semantics of Avro's Schema format.&lt;/PRE&gt;&lt;P&gt;${inferred.avro.schema} is an attribute of the flow file and doesn't make sens for the registry.&lt;/P&gt;&lt;P&gt;To implement your use case, you should use "use schema text property" as a schema access strategy. It's more suitable for your use case with dynamic schemas. This way, the schema can be read from the flow file and used for the conversion.&lt;/P&gt;&lt;P&gt;A schema registry is more for governance so you will be adding and managing schemas manually.&lt;/P&gt;&lt;P&gt;Configure your CSVReader like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40821-screen-shot-2017-10-12-at-103434-pm.png" style="width: 1020px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16711i521951C397AE2DC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40821-screen-shot-2017-10-12-at-103434-pm.png" alt="40821-screen-shot-2017-10-12-at-103434-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And your JSONRecordSetWritter like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40822-screen-shot-2017-10-12-at-103533-pm.png" style="width: 1021px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16712i48A2063D77F181BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40822-screen-shot-2017-10-12-at-103533-pm.png" alt="40822-screen-shot-2017-10-12-at-103533-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried it on your flow/data and it's working.&lt;/P&gt;&lt;P&gt;Dos this helps?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:04:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210784#M172726</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2019-08-18T04:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Am I Configuring NiFi's AvroSchemaRegistry Correctly</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210785#M172727</link>
      <description>&lt;P&gt;This worked! Thank you very much Abdelkrim Hadjidj. Your explanation makes sense, and I understand now what I was doing incorrectly.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 19:52:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210785#M172727</guid>
      <dc:creator>pmaggiulli</dc:creator>
      <dc:date>2017-10-20T19:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Am I Configuring NiFi's AvroSchemaRegistry Correctly</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210786#M172728</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/44348/pmaggiulli.html" nodeid="44348"&gt;@Patrick Maggiulli&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Glad that the answer was useful. Please accept the answer to close this thread. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:39:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210786#M172728</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-20T20:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Am I Configuring NiFi's AvroSchemaRegistry Correctly</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210787#M172729</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/44348/pmaggiulli.html" nodeid="44348"&gt;@Patrick Maggiulli&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I tried the same flow, i am putting the data into HBase from HTTP. &lt;/P&gt;&lt;P&gt;I have one CSV file that contains field (ID,Movie,Type), In GetFile processor i am taking this file and flow remains same as yours. In UpdateAttribute i am giving schema.name is "MoviesRecord".&lt;/P&gt;&lt;P&gt;But getting error in ConvertRecord processor that ConvertRecord is failed to process StandardFlowFileRecord "will route to failure Field field_0 can not be null. "&lt;/P&gt;&lt;P&gt;Any help that would be great.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 13:42:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-Configuring-NiFi-s-AvroSchemaRegistry-Correctly/m-p/210787#M172729</guid>
      <dc:creator>sshringi003</dc:creator>
      <dc:date>2018-08-29T13:42:58Z</dc:date>
    </item>
  </channel>
</rss>

