[ https://issues.apache.org/jira/browse/NIFI-14297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930868#comment-17930868 ]
Jordan Sammut commented on NIFI-14297: -------------------------------------- [~dstiegli1] We are currently migrating to NiFi 2.2.0 from NiFi 1.13.2, where this type of schema worked with no issues. Replicating the steps in the description, hooking the Schema to a JsonRecordSetWriter, and making use of this on a ConvertRecord shows the desired outcome. We have also utilise this approach when Publishing, and consuming from a ClickHouse environment, yielding the correct default value. > Avro Schemas: No support for String default on bytes with 'decimal' > logicalType > ------------------------------------------------------------------------------- > > Key: NIFI-14297 > URL: https://issues.apache.org/jira/browse/NIFI-14297 > Project: Apache NiFi > Issue Type: Bug > Components: NiFi API > Affects Versions: 2.2.0 > Environment: Docker with NiFi 2.2.0 Image > Reporter: Jordan Sammut > Priority: Blocker > Fix For: 2.3.0 > > Attachments: image-2025-02-25-15-59-37-422.png, > image-2025-02-26-23-23-44-465.png, image-2025-02-26-23-25-03-032.png > > > There is currently no way to utilise an AVRO schema, with a field of type > 'bytes' and logicalType 'decimal', and providing a string for a default value. > *Steps to reproduce:* > * Launch a NiFi Environment using Version 2.2.0 > * Create an AVROSchemaRegistry Service > * Insert a schema, with a field as type 'bytes', logicalType 'decimal' and > default "0.0000" > Example: > {code:java} > { > "type": "record", > "name": "ExampleRecord", > "fields": [ > { > "name": "big_decimal_field", > "type": { > "type": "bytes", > "logicalType": "decimal", > "precision": 10, > "scale": 4 > }, > "default": "0.0000" > } > ] > } {code} > *Result:* > Service enters "Invalid" State > !image-2025-02-25-15-59-37-422.png|width=471,height=188! -- This message was sent by Atlassian Jira (v8.20.10#820010)