fiware-cygnus
fiware-cygnus copied to clipboard
Arcgis. Cygnus is using case sensitivity with attributes although arcgis is not case sensitive
Cygnus no actualiza los atributos si en el CB el atributo está definido como mayúsculas y en la capa Arcgis está definido con minúsculas.
Arcgis no es case sensitive respecto a los atributos (features) que se le indican en un "updateFeature", seguramente en un "addFeature" tampoco. Esto quiere decir que un campo de la capa Arcgis está definido como "la10" se le puede enviar la petición con la feature "LA10" y lo actualiza correctamente.
Parece que el sink está haciendo un filtrado de los atributos que se van a enviar y no coinciden con los atributos existentes en la capa. Puede ser en el siguiente punto: https://github.com/telefonicaid/fiware-cygnus/blob/031d7b0514442b774a4f3e6a3d7b6f9dafb674eb/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java#L391
Esto a lo mejor podría resolverse como en otras ocasiones con equalsIgnoreCase()
It seems the responsible for checking the existence of the attribute taking in account the case is the method containsKey ()
in:
https://github.com/telefonicaid/fiware-cygnus/blob/8bcbbedb2f03abe39ba1ec9ac7e4f339f05e3f61/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java#L624-L626
because when attributes that don't match the method hasAttribute
cygnus throws:
time=2023-10-26T14:17:05.542Z | lvl=DEBUG | corr=4edfa531-7443-4537-b94c-0b9b5717a52e; cbnotif=1 | trans=d2a0be73-29f7-41af-843c-200fc013a089 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=cleanFeature | msg=com.telefonica.iot.cygnus.backends.arcgis.restutils.ArcgisFeatureTable[693] : ArcgisFeatureTable, cleanFeature: Field not found in table, ignoring it, LA10
It seems the responsible for checking the existence of the attribute taking in account the case is the method
containsKey ()
in:https://github.com/telefonicaid/fiware-cygnus/blob/8bcbbedb2f03abe39ba1ec9ac7e4f339f05e3f61/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java#L624-L626
because when attributes that don't match the method
hasAttribute
cygnus throws:time=2023-10-26T14:17:05.542Z | lvl=DEBUG | corr=4edfa531-7443-4537-b94c-0b9b5717a52e; cbnotif=1 | trans=d2a0be73-29f7-41af-843c-200fc013a089 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=cleanFeature | msg=com.telefonica.iot.cygnus.backends.arcgis.restutils.ArcgisFeatureTable[693] : ArcgisFeatureTable, cleanFeature: Field not found in table, ignoring it, LA10
Done in https://github.com/telefonicaid/fiware-cygnus/pull/2319/commits/db8f42350012f5d24ef1614d3a4183f3e76fbb95
PR https://github.com/telefonicaid/fiware-cygnus/pull/2319 with the fix has been merged.
@danielvillalbamota could you have a look and close this issue if it is already solved by that PR, pls? (or specify what's missing or not working in negative case)
PR #2319 with the fix has been merged.
@danielvillalbamota could you have a look and close this issue if it is already solved by that PR, pls? (or specify what's missing or not working in negative case)
That PR included the last commit that was not enough to solve this issue, in fact, it introduced a not desired behavior, so it has been reverted in this PR https://github.com/telefonicaid/fiware-cygnus/pull/2321.
This issue still exists but can be avoided by using name mappings
In version 3.3.0 we have provided a solution that solves this issue but requires NM.
The definitive solution for this issue will be a solution which doesn't need NM usage.