Is it possible to have an optional field in an Avro schema (i.e. the field does not appear at all in the .json file)?

you can define the default attribute as undefined example.
so the field can be skipped.

{ 
   "name": "first_name",
   "type": "string",
   "default": "undefined"
},

Also all field are manadatory in avro.
if you want it to be optional, then union its type with null.
example:

{
    "name": "username",
    "type": [
      "null",
      "string"
    ],
    "default": null
},

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)