Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: NiFi integration - Tag names with dots throws Avro exception even when not using Avro #195

Open
1 of 16 tasks
QuanticPony opened this issue Oct 24, 2024 · 0 comments
Open
1 of 16 tasks
Assignees
Labels
bug Something isn't working

Comments

@QuanticPony
Copy link

What happened?

Reproduction steps:

  1. Using the Plc4xSourceRecordProcessor set the writer (processor output) to json, csv or any other than avro.
  2. When declaring a tag set the name as A.1 or 1.A with any address and driver.
  3. Run
    A org.apache.avro.SchemaParseException is raised.

On the mailing list @ottobackwards correctly pointed out that using the avro specification (https://avro.apache.org/docs/1.7.7/spec.html#Names) for tag names does not raise the exception.

This is due to creating an avro schema from the response and converting it to a NiFi schema before using the writer configured on the processor.
That step is is not needed if the processor creates a NiFi record directly. That would allow to have tags not allowed on avro specification for field names on other writers and would not be a problem for avro as it's writer handles non valid field names (https://github.com/apache/nifi/blob/35219052e13c9a2a2f3a40e125832a872067d1b1/nifi-extension-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java#L132).

Version

0.13.0-SNAPSHOT

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7
@QuanticPony QuanticPony added the bug Something isn't working label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants