<?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: Avro Schema field to accept string and dynamic array in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Avro-Schema-field-to-accept-string-and-dynamic-array/m-p/391351#M247578</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/114278"&gt;@albelide&lt;/a&gt;,&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged our Kafka experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/81193"&gt;@Babasaheb&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/15085"&gt;@Yuexin Zhang&lt;/a&gt;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 09:58:09 GMT</pubDate>
    <dc:creator>VidyaSargur</dc:creator>
    <dc:date>2024-08-05T09:58:09Z</dc:date>
    <item>
      <title>Avro Schema field to accept string and dynamic array</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Avro-Schema-field-to-accept-string-and-dynamic-array/m-p/391301#M247557</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;I am trying to create an AVRO schema where a field can accept both string data(Expected Format 2) and a dynamic array (Expected Format 1).&lt;/P&gt;&lt;P&gt;AVRO schema has event/processFlow/characteristic []/value which is supposed to accept both dynamic array and string. For the “object_avro”, we are passing “object_json” as input. However as per "object_avro it is accepting only Expected Format 1 JSON block.&lt;/P&gt;&lt;P&gt;Kindly provide us a solution where an AVRO schema can accept both Expected Format 1 and Expected Format 2 JSON's.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avro Schema:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"doc": "Sample schema to help you get started",&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"name": "event",&lt;BR /&gt;"type": {&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"name": "processFlow",&lt;BR /&gt;"type": {&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"name": "id",&lt;BR /&gt;"type": "string"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "characteristic",&lt;BR /&gt;"type": {&lt;BR /&gt;"items": {&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "id",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "name",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "valueType",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "value",&lt;BR /&gt;"type": {&lt;BR /&gt;"items": {&lt;BR /&gt;"type": "map",&lt;BR /&gt;"values": [&lt;BR /&gt;"string",&lt;BR /&gt;"null",&lt;BR /&gt;"int",&lt;BR /&gt;"boolean"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;"type": "array"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "baseType",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "schemaLocation",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"default": null,&lt;BR /&gt;"name": "type",&lt;BR /&gt;"type": [&lt;BR /&gt;"null",&lt;BR /&gt;"string"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"name": "characteristic",&lt;BR /&gt;"type": "record"&lt;BR /&gt;},&lt;BR /&gt;"type": "array"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;],&lt;BR /&gt;"name": "processFlow",&lt;BR /&gt;"type": "record"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"name": "event",&lt;BR /&gt;"type": "record"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"name": "processFlowManagement",&lt;BR /&gt;"namespace": "value.stc.b2b.processFlowManagement",&lt;BR /&gt;"type": "record"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expected Format 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"value":[&lt;BR /&gt;{&lt;BR /&gt;"name":{"string":"abcd"},&lt;BR /&gt;"partnerId":{"int":123},&lt;BR /&gt;"partnerType":{"boolean":true}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"custom":{"string":"abcd"},&lt;BR /&gt;"id":{"int":123},&lt;BR /&gt;"partnerType":{"boolean":true}&lt;BR /&gt;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expected Format 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"value":{"string":"hello"}&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;&lt;SPAN class="ui-flex a bz ca cb cg ch ci cj cl cm"&gt;&lt;SPAN class="fui-Primitive ___18vc9ki fan4evk"&gt;&lt;SPAN class="fui-Flex ___1758ndo f22iagw f1vx9l62 f1l02sjl f1p9o1ba f1sil6mw fhfum1"&gt;&lt;SPAN class="fui-Primitive ___u2iuyv0 f1ekcaio f1mpe4l3 fkrn0sh f179hvsh fmxx68s f1538868 f1p9o1ba f1sil6mw f1nbblvp fifp7yv f1ov4xf1 f1asdtw4 frkrog8 f1euv43f"&gt;has context menu&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 12:59:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Avro-Schema-field-to-accept-string-and-dynamic-array/m-p/391301#M247557</guid>
      <dc:creator>albelide</dc:creator>
      <dc:date>2024-08-02T12:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Avro Schema field to accept string and dynamic array</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Avro-Schema-field-to-accept-string-and-dynamic-array/m-p/391351#M247578</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/114278"&gt;@albelide&lt;/a&gt;,&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged our Kafka experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/81193"&gt;@Babasaheb&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/15085"&gt;@Yuexin Zhang&lt;/a&gt;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 09:58:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Avro-Schema-field-to-accept-string-and-dynamic-array/m-p/391351#M247578</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-08-05T09:58:09Z</dc:date>
    </item>
  </channel>
</rss>

