Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

AVRO Schema Registry Namespace

avatar
Explorer

Is the namespace field in an AVRO schema required?  Does the namespace first have to be created if you provide it in the schema?  Not sure how this works.

 

Thanks,

 

johndcal

1 ACCEPTED SOLUTION

avatar
Super Guru

@johndcal A namespace is not required within the avro schema source in Schema Registry.   In the context of avro spec. 

 

In order to create an avro schema in the Schema Registry, you have to send the first call to create the schema entity.  The next call is then to add the actual avro schema to the existing entity.  This is just the behavior of the Schema Registry.   You can find some lessons I created in how to use the registry:

 

https://community.cloudera.com/t5/Community-Articles/Using-the-Schema-Registry-API/ta-p/286194

 

I also have an article showing how to fully automate the creation of Avro Schemas from CSV file (column name and data type) using the Schema Registry, Hive, and NiFI:

 

https://community.cloudera.com/t5/Community-Articles/How-to-automate-creation-of-Avro-and-Hive-Schem...

 

 

If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  

 

Thanks,


Steven @ DFHZ

View solution in original post

1 REPLY 1

avatar
Super Guru

@johndcal A namespace is not required within the avro schema source in Schema Registry.   In the context of avro spec. 

 

In order to create an avro schema in the Schema Registry, you have to send the first call to create the schema entity.  The next call is then to add the actual avro schema to the existing entity.  This is just the behavior of the Schema Registry.   You can find some lessons I created in how to use the registry:

 

https://community.cloudera.com/t5/Community-Articles/Using-the-Schema-Registry-API/ta-p/286194

 

I also have an article showing how to fully automate the creation of Avro Schemas from CSV file (column name and data type) using the Schema Registry, Hive, and NiFI:

 

https://community.cloudera.com/t5/Community-Articles/How-to-automate-creation-of-Avro-and-Hive-Schem...

 

 

If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  

 

Thanks,


Steven @ DFHZ