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

Arcgis. Cygnus is using case sensitivity with attributes although arcgis is not case sensitive #2320

Open
danielvillalbamota opened this issue Oct 26, 2023 · 5 comments

Comments

@danielvillalbamota
Copy link
Collaborator

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:

Esto a lo mejor podría resolverse como en otras ocasiones con equalsIgnoreCase()

@danielvillalbamota
Copy link
Collaborator Author

It seems the responsible for checking the existence of the attribute taking in account the case is the method containsKey () in:

public boolean hasAttribute(String attName) {
return arcGISFeatureTable.getTableAttributes().containsKey(attName);
}

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

@AlvaroVega
Copy link
Member

It seems the responsible for checking the existence of the attribute taking in account the case is the method containsKey () in:

public boolean hasAttribute(String attName) {
return arcGISFeatureTable.getTableAttributes().containsKey(attName);
}

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 db8f423

@fgalan
Copy link
Member

fgalan commented Nov 3, 2023

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)

@danielvillalbamota
Copy link
Collaborator Author

danielvillalbamota commented Nov 15, 2023

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 #2321.

This issue still exists but can be avoided by using name mappings

@fgalan
Copy link
Member

fgalan commented Nov 17, 2023

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.

@danielvillalbamota danielvillalbamota changed the title Arcgis. El update filtra los atributos que no coinciden con la lista de atributos de la capa (haciendo un filtrado case sensitive) Arcgis. Cygnus is using case sentivity with attributes although arcgis is not case sensitive Dec 4, 2023
@danielvillalbamota danielvillalbamota changed the title Arcgis. Cygnus is using case sentivity with attributes although arcgis is not case sensitive Arcgis. Cygnus is using case sensitivity with attributes although arcgis is not case sensitive Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants