ConduitIO / conduit

Conduit streams data between data stores. Kafka Connect replacement. No JVM required.
https://conduit.io
Apache License 2.0
384 stars 44 forks source link

support empty .payload.After / .payload.Before in avro.decode #1678

Closed samirketema closed 3 months ago

samirketema commented 3 months ago

Description

The avro decode processor states the following:

If a specific field is set to nil the processor won't have enough information to determine the type and will default to a nullable string.

In the case that the entire .payload.after is nil, the processor fails with the following error:

failed getting structured data: failed unmarshalling JSON from raw data: expected {} for map

This attempts to alleviate the issue, by instead returning an empty sdk.StructuredData in this scenario.

Fixes # (issue)

Quick checks: