I have two steps defined in my process:
[{
"operation": "modify-default-beta",
"spec": {
"my_key": null,
{
"type": "record",
"name": "my_name",
"fields": [
{
"name": "my_key",
"type": "string",
The problem is that ConvertJSONToAvro processor sends records to the failure queue if it detects null
value. If it is an empty string, it works well. With strings, I can provide an empty string value, but with booleans, I need to use null
.
How can I enable ConvertJSONToAvro
processor to parse null values?
For nullable values you need to use union of your Avro type and null value in your Apache Avro schema, like so:
{
"type": "record",
"name": "my_name",
"fields": [
{
"name": "my_key",
"type": ["null", "string"],