{"id":3216,"date":"2018-12-18T13:14:28","date_gmt":"2018-12-18T12:14:28","guid":{"rendered":"http:\/\/www.pleus.net\/blog\/?p=3216"},"modified":"2019-01-10T13:50:48","modified_gmt":"2019-01-10T12:50:48","slug":"free-avro-viewer","status":"publish","type":"post","link":"https:\/\/www.pleus.net\/blog\/?p=3216","title":{"rendered":"Free Avro Schema Viewer"},"content":{"rendered":"<p><a href=\"https:\/\/avro.apache.org\" target=\"_blank\">Avro<\/a> is a data serialization system. The core is Avro schema which can be used to describe the structure of datasets very much like XML Schema or JSON Schema. Avro is primarily used in Big Data scenarios for which it offers special features like schema evolution. This is a typical Avro file:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n{&quot;namespace&quot;: &quot;net.pleus.domain&quot;,\r\n    &quot;name&quot;: &quot;customer&quot;,\r\n    &quot;version&quot;:&quot;1.0&quot;,\r\n    &quot;doc&quot; : &quot;Customer Dataset&quot;,\r\n    &quot;type&quot;: &quot;record&quot;, \r\n    &quot;fields&quot;: [\r\n        {&quot;name&quot;: &quot;id&quot;, &quot;type&quot;: &quot;int&quot;,&quot;default&quot;:&quot;-1&quot;, &quot;doc&quot;:&quot;Unique id of the customer&quot;},\r\n        {&quot;name&quot;: &quot;name&quot;, &quot;type&quot;: [&quot;string&quot;, &quot;null&quot;],&quot;default&quot;:null,&quot;aliases&quot;:[&quot;fullname&quot;],&quot;doc&quot;:&quot;Customer's name (optional)&quot;},\r\n        {&quot;name&quot;:&quot;address&quot;, &quot;default&quot;:null, &quot;doc&quot;:&quot;Address information&quot;,\r\n            &quot;type&quot;:{\r\n                &quot;type&quot;:&quot;record&quot;,\r\n                &quot;name&quot;:&quot;address&quot;,\r\n                &quot;fields&quot;:[\r\n                    {&quot;name&quot;: &quot;street&quot;, &quot;type&quot; : &quot;string&quot;,&quot;default&quot;:&quot;unknown&quot;, &quot;doc&quot;:&quot;Street&quot;},        \r\n                    {&quot;name&quot;: &quot;city&quot;, &quot;type&quot;: &quot;string&quot;,&quot;default&quot;:&quot;unknown&quot;, &quot;doc&quot;:&quot;City&quot;}\r\n                ]\r\n            }\r\n        },\r\n        {&quot;name&quot;: &quot;contact&quot;, &quot;default&quot;:null, &quot;doc&quot;:&quot;List of contact options&quot;, &quot;type&quot;: {\r\n            &quot;type&quot;: &quot;array&quot;,\r\n            &quot;items&quot;: {\r\n                &quot;type&quot;:&quot;record&quot;,\r\n                &quot;name&quot;:&quot;contact&quot;,\r\n                &quot;fields&quot;:[\r\n                    {&quot;name&quot;: &quot;type&quot;, &quot;type&quot; : { &quot;name&quot;:&quot;values&quot; , &quot;type&quot;: &quot;enum&quot;, &quot;namespace&quot; : &quot;net.pleus.contacts&quot;, &quot;symbols&quot; : [&quot;EMAIL&quot;, &quot;PHONE&quot;, &quot;MESSENGER&quot;]}, &quot;doc&quot; : &quot;Type of contact&quot;},        \r\n                    {&quot;name&quot;: &quot;url&quot;, &quot;type&quot;: &quot;string&quot;,&quot;default&quot;:&quot;unknown&quot;, &quot;doc&quot;:&quot;The contact url&quot;}\r\n                ]\r\n            }            \r\n        }}\r\n    ]\r\n   }\r\n<\/pre>\n<p>As you can see it is a JSON file that is structured according to the Avro specification. Although this verbose form might be suitable for technical people, often such structure definitions have to be discussed with non-technical people from the business domain. This is especially the case if you follow a domain driven approach. <\/p>\n<p>To make it easier to discuss and negotiate Avro structure definitions without creating redundant model representations, I&#8217;ve created an easy to use <a href=\"https:\/\/www.pleus.net\/avroviewer\">Avro Viewer<\/a>. If you drop the file shown above you will see a visual representation that just shows the essence of the schema.<\/p>\n<p><a href=\"http:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer.png\"><img decoding=\"async\" src=\"http:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer.png\" alt=\"\" width=\"500\" class=\"alignnone wp-image-3236\" srcset=\"https:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer.png 790w, https:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer-266x300.png 266w, https:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer-768x866.png 768w, https:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer-133x150.png 133w, https:\/\/www.pleus.net\/blog\/wp-content\/uploads\/2018\/12\/avroviewer-400x451.png 400w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><\/a><\/p>\n<p>You can see records, enums, arrays, defaults, aliases, documentation and so on without the JSON markup noise.<br \/>\n<a href=\"https:\/\/www.pleus.net\/avroviewer\">Avro Viewer<\/a> is free to use. It is just plain HTML+JavaScript+CSS. If required you can download the source and modify it to suit your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Avro is a data serialization system. The core is Avro schema which can be used to describe the structure of datasets very much like XML Schema or JSON Schema. Avro is primarily used in Big Data scenarios for which it offers special features like schema evolution. This is a typical Avro file: As you can &hellip; <a href=\"https:\/\/www.pleus.net\/blog\/?p=3216\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Free Avro Schema Viewer<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[89,90,41,82,92,36,40],"class_list":["post-3216","post","type-post","status-publish","format-standard","hentry","category-big-data","tag-avro","tag-big-data","tag-css","tag-domain-driven-design","tag-hadoop","tag-html5","tag-javascript"],"_links":{"self":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3216"}],"version-history":[{"count":28,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3216\/revisions"}],"predecessor-version":[{"id":3246,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3216\/revisions\/3246"}],"wp:attachment":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}