Select to view content in your preferred language

ArcGISFeatureService writer creates service but no features written

483
15
a month ago
JuneAcosta
Frequent Contributor

I’m using the Esri Geodatabase (ArcSDE) reader and the safe.esri-AGOL.ArcGISFEATURESERVICE writer to publish to our ArcGIS Portal (Portal [11.3], ArcGIS Pro [3.5.1]). The feature service gets created, but it’s always empty.

The source feature class has about 56,764 records, but the writer log shows this error:

ArcGISFeatureServiceWriter: append error: Write job failure: 'Error has occurred.'
ArcGISFeatureServiceWriter: 0 features successfully written to 'aaSiteAddressPointDEV2',
but the server rejected the 56765 features in the last request due to errors.
Python Exception <RejectedBatchWrite>: FMEException...

Has anyone run into this? Any advice on what usually causes the “rejected batch write” when using the ArcGISFeatureService writer to Portal?

Thanks!

0 Kudos
15 Replies
RenatoSalvaleon3
Esri Contributor

The new ESRI ArcGIS Feature Service is backwards compatible down to Portal 11.3, however, it will not hurt if you replace it the ArcGIS Portal Feature Service writer and check if you get the same error.

For the error message itself. At what point in the translation did the writer logged a rejection? Was there a long pause after the first feature entered the writer feature type?  Some possible scenarios can be date fields, attribute names, attribute types, coordinate system (although unlikely with CS since the log will return an error). What's your source SDE dbms? The data store for Enterprise hosted feature layers is Postgres so case matters with field names. A BulkAttributeRenamer can be neccesary sometimes. Cpnvert dates to strings for troubleshooting purposes as well.

You can also file a support case if the above can be too daunting to troubleshoot.

0 Kudos
BruceHarold
Esri Frequent Contributor

Another possibility is the wrong geometry type is in the data, for example it is OK if the data has null geometry but not if it has line or polygon geometry when you're trying to write to a point feature layer.  Also, it is always a good idea when reading and writing between different storage platforms to define your writer by importing the schema definition from the source dataset.  Both sides of your equation are Esri technology so this will be reliable.

0 Kudos
JuneAcosta
Frequent Contributor
Thanks for responding! I've been working on this on and off for a couple of weeks with no luck. We're testing branch versioning in our stage environment, and I'm trying to use FME to load ~300 layers from our EGDB into Portal. FME still feels like the easiest path, but I'm running into issues.

Per your suggestion, could you clarify exactly how to "define the writer by importing the schema from the source dataset" in FME? I'm not sure which dialog/step you mean (Add Writer vs. Import Feature Types vs. Feature Type Definition).

I've attached the log, and a screenshot of my workbench.

I'll also test with the ArcGIS Portal Feature Service writer again to see if I get the same results. I think that's where I originally started, but Safe recommended I use the new writer-so I'll try it one more time just to compare.

[cid:image001.png@01DC3440.F488CE70]


0 Kudos
BruceHarold
Esri Frequent Contributor

Hi, the screen shot didn't make it ;-(

0 Kudos
JuneAcosta
Frequent Contributor

Thanks for responding! I’ve been working on this on and off for a couple of weeks with no luck. We’re testing branch versioning in our stage environment, and I’m trying to use FME to load ~300 layers from our EGDB into Portal. FME still feels like the easiest path, but I’m running into issues.

Our source egdb is MSSQL. Per your suggestion, could you clarify exactly how to “define the writer by importing the schema from the source dataset” in FME? I’m not sure which dialog/step you mean (Add Writer vs. Import Feature Types vs. Feature Type Definition).

I’ve attached the log, and a screenshot of my workbench.

I’ll also test with the ArcGIS Portal Feature Service writer again to see if I get the same results. I think that’s where I originally started, but Safe recommended I use the new writer—so I’ll try it one more time just to compare.

JuneAcosta_0-1759507296818.png

 

0 Kudos
BruceHarold
Esri Frequent Contributor

Hi June

When adding a writer you have the option to import its definition from an existing dataset, see outlined in red here:

BruceHarold_0-1759508336361.png

I'll look at your log shortly.

 

0 Kudos
BruceHarold
Esri Frequent Contributor

Hello again, I see you're reading in state plane and writing out web mercator.  In this situation the data is supposed to be automatically reprojected but it's possible something is not working at this step, so you could add an EsriReprojector (or plain Reprojector) in your workspace to see if that helps.

I also see you're using OneDrive as a shared file location, we have not tested this and it's possible it can be an issue.

If problems remain after importing the write definition and reprojecting your data please open a support call.

0 Kudos
BruceHarold
Esri Frequent Contributor

Another thing, try reducing the batch size being written from the default 1000 to 500 (and less if necessary), if your data is very point rich it might be a problem.

0 Kudos
JuneAcosta
Frequent Contributor

Yes, I reduced it to a "max feature per request: 5oo" but still did not work.

0 Kudos