Skip to main content
Solved

How to dynamically write new or update existing ArcGIS Online Feature Layers.


jack.heiniger
Contributor
Forum|alt.badge.img+3

I’m currently dynamically reading web feature service layers by using a feature reader and trying to write them up to AGOL. I have no issues dynamically writing to a File GDB, but if I attempt to write to AGOL, I only get a Python KeyError, which isn’t telling me anything. 

Message Type: fme::internal::_v0::py::Exception
Python Exception <KeyError>: 'Cadastre_Address_LGATE002'
ARCGISONLINEFEATURES writer: An error has occurred. Check the logfile above for details

This only occurs when I want to write dynamically to AGOL, if I just write the exposed attributes it functions. Is there any way around this? I’m aiming to use one workspace to read in the features based on parameters, and write it out using parameters, as a way of creating and updating feature services.

I should note that it seems to be half creating the feature service itself, but when it comes to write any features to the newly made feature service, the error appears.

Thanks

Best answer by crutledge

Huh. Well we are getting closer to,😀

 

🤔you know what I have had to do in the past and you could try here based on what you have described:

Before writing to AGOL add in a Feature writer to fgdb then connect a Feature reader to read that in and then write that data to AGOL.

Hope that helps.

View original
Did this help you find an answer to your question?

4 replies

crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • July 2, 2025

Hi ​@jack.heiniger 

You could try selecting  Create Feature Service Using File Upload to Yes in the feature writer parameters.

I would also check if there are any data types or attribute names that might mess things up. Sending ObjectId through the writer can cause issues too.

Hope that helps.


jack.heiniger
Contributor
Forum|alt.badge.img+3

Hi ​@crutledge 

After filtering out the objectid and turning on the Create Feature Service Using File Upload, a layer is it no longer errors out, however it's still not publishing any features, and is creating a hosted table, even though geometry is specified within the attribute {} list. I’m also now getting 20,000+ warnings, with the first notable one being 

“Cannot define schema for 'Cadastre_Address_LGATE002' as the feature does not contain schema information, and schema source is set to 'Schema from Schema Feature'. Please verify writer feature type configuration”

Here’s my writer setup and what is being written.

I can see in the rest end point that the feature service is still being created, but with no layers or tables attached.

 

As far as I can tell, no other attribute names or data types are unsupported.

 

Thanks


crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • Best Answer
  • July 2, 2025

Huh. Well we are getting closer to,😀

 

🤔you know what I have had to do in the past and you could try here based on what you have described:

Before writing to AGOL add in a Feature writer to fgdb then connect a Feature reader to read that in and then write that data to AGOL.

Hope that helps.


jack.heiniger
Contributor
Forum|alt.badge.img+3

That seems to work. I’m using a feature writer for a FileGDB, then using ArcGIS Online Connectors to upload and publish the FileGDB as a Hosted Feature Layer.

Once it’s been initially published, I can just use the one feature writer to update the layer.

Thanks for all the help ​@crutledge ! 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings