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

Fix incorrect querying of object ids in ArcGIS connector #9013

Merged
merged 4 commits into from
Jul 21, 2016

Conversation

jgoizueta
Copy link
Contributor

Enhance also error reporting: detect invalid layer types
Fixes #8958

Enhance also error reporting: detect invalid layer types
Fixes #8958
else
ids_field = {where: "OBJECTID >=#{ids.first} AND OBJECTID <=#{ids.last}"}
if oid_field

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert if nested inside else to elsif.

@jgoizueta
Copy link
Contributor Author

Previous behaviour:

  • Non vector layers caused an "Missing data: 'fields'" error.

New behaviour:

  • For multi-resource (i.e. URLs of a REST service, not of a particular layer) only vector layers are selected and imported. Then if no layers are selected an "Empty layers list" error occurs
  • For a single layer import, an "Invalid layer type" occurs if it is not a vector layer.

So, now for a case like #8958 or an URL with vector and non-vector layers, the import is successful and only vector layers are imported.

Also imports of non supported version 10.01 could fail with "Missing data: supportedQueryFormats". Now it fails with an "Unsupported ARCGIS version error"

Otherwise methods such as present? or blank? are not available
We require a valid type now in the layer metadata
@jgoizueta
Copy link
Contributor Author

Please @ethervoid review this

@jgoizueta jgoizueta merged commit 293b8d0 into master Jul 21, 2016
@jgoizueta jgoizueta deleted the 8958-arcgis-oids branch July 21, 2016 15:54
@julianamori
Copy link

Hey guys,

I´m the user who was trying to upload the dataset from ArcGIS which generated this issue. I´ve been following all the thread, thanks for all the effort in solving it and clarifying the error!

Now that you have the bug fixed, I´ve tried to upload the same datasets from ArcGIS again and, as I understood from your explanations, the vector layer from the dataset (layer 0 from the REST link) is now successfully uploaded:
https://infoamazonia.carto.com/dataset/imagen_no_disponible_3
(we can see all the 11 polygons instead of only 2)

But layer 1 ("Periodo") from the same REST link is a Raster Layer and, now I understang, cannot be successfully uploaded. Anyway - just so you have a feedback - CARTO still shows me a generic error message, where it should show the new behavior you listed above, right?

Error retrieving data from datasource (1011)
There was an error retrieving data from the datasource. Check that the file/data is still present.
Persisting error? Please send us the following code:
985f640c-e21f-4302-9eb4-9518bad76eea

@jgoizueta
Copy link
Contributor Author

Hi @julianamori: You're right, that error message is misleading and should be changed; I've open a new ticked for that issue: #9108

Thanks for reporting!

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

Successfully merging this pull request may close these issues.

3 participants