I believe that this must be followed.

https://avro.apache.org/docs/1.7.7/spec.html#Names


On October 18, 2024 at 11:28:30 AM, Christofer Dutz (
christofer.d...@c-ware.de) wrote:

Hi Unai,



seems as if this is more a Nifi issue, than anything we can change, right?



Possibly we could escape address strings that we output using URL encoding
(Making “A.1” to “A%2E1”)

Would that help?



Unfortunately, I don’t understand the details of NiFi to judge if my
comment is nonsense.



Chris





*Von: *Unai Leria <unai.le...@zylk.net.INVALID>
*Datum: *Freitag, 18. Oktober 2024 um 16:26
*An: *dev <dev@plc4x.apache.org>
*Betreff: *NiFi Integration issue with tag names

Hi Plc4x devs,



Recently a colleague found that they could not include dots on tag's names
working with the PlcSourceRecordProcessor.

Raising an Avro schema parser exception even if the of the source record
processor is not set to Avro.

This is caused by the internal schema (an Avro schema) that we create in
order to improve performance.



We think that it could be considered an issue as the exception mentions
Avro regardless of the writer used, could be confusing.



Could be resolved if we change the Avro schema for a NiFi RecordSchema.

Would not affect performance as we later create a NiFi RecordSchema from
that Avro schema using some NiFi utils. Here
<https://github.com/apache/plc4x-extras/blob/d301f75ac4a33533ad8601455eedbef1a704d953/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/record/Plc4xReadResponseRecordSet.java#L79>



I did the changes on a fork and tested it. Found that if a tag is named
with dots the Avro record writer changes it automatically to an underscore.

This could also be strange from the point of view of an user, as a the
record's output schema could change depending on the record writer.

We though of adding a validation to the names so that a valid schema could
be made for the configured writer but there are not validate methods on the
writers interface.

Therefor the responsibility to have valid tag names for the configured
writer would lay on the user.



I still think it's a good change but would like to read your opinion



Unai







--

------------------------------------
Unai Lería Fortea
Big Data Developer
ZYLK | Open IT Experts

Este mensaje y los adjuntos pueden contener información confidencial, no
estando permitida su comunicación, reproducción o distribución. Si usted no
es el destinatario final, le rogamos nos lo comunique y borre el mismo. De
conformidad con el que dispone la normativa vigente en protección de datos
RGPD y LOPDGDD, le informamos que los datos personales serán tratados bajo
la responsabilidad de ZYLK.NET.S.L. Puede ejercer los derechos de acceso,
rectificación, portabilidad, supresión, limitación y oposición mandando un
mensaje a administrac...@zylk.net

Reply via email to