AnsweredAssumed Answered

Export/download non-spatial tables to runtime geodatabase

Question asked by MarcWouters37 on Sep 20, 2017
Latest reply on Sep 21, 2017 by MarcWouters37

I have published a feature service which has both spatial layers and non-spatial tables.

Next, I want to generate a runtime .geodatabase using GenerateGeodatabaseJob::generateGeodatabase(parameters, fileLocation).

The parameters are generated with GeodatabaseSyncTask::createDefaultGenerateGeodatabaseParameters().

The documentation of this method says 

  • All layers from the service will be included

But also 

  • Related tables and layers are not included.

I guess this included non-spatial tables.

To fix this, I set the GenerateLayerOption.setUseGeometry to False, and add a whereClause to select everything ("1=1").

But still, I get the following error :

Unable to create replica. Please check your parameters." : "Exporting data for layer 10 failed."

First of all, is it possible to download non-spatial tables with these methods ?

And if yes, which settings do I need to change ?


All suggestions are welcome.


PS : There is an "ugly" workaround, but I like to avoid it : convert all non-spatial tables to feature tables, by adding a shape field with 1 point