Skip to main content

I feel like I must be missing something obvious but so far have not been able to resolve.  I have published a Web Layer from Arc Pro to our organizational AGOL account.  This Web Layer feature service contains three sub-layers.  I’d like to update only one of the sub layers using FME.  This works fine if I publish each layer as its own service, but if published as a single service with multiple sub-layers, I can’t figure out how to target only a single sub-layer. Publishing these as a single multi-layer service has the advantage of keeping them ordered together on AGOL.

When I open FeatureWriter to set parameters, I can select the overall feature service, but not an individual sub-layer.  I suppose I can run it without specifically identifying which of the sub layers I am targeting but am a little hesitant as I’m not sure how it would know which of the sub-layers I’m attempting to update.  

Here is screen shot of my FeatureWriter interface below.  Road Rock is the feature service containing the sublayers, but again no obvious way to drill down to them.

 

This is the view of the layer w/sublayers in AGOL.  While the Road Rock feature service does show up in FME, none of the sublayer names do.  Also, in AGOL the Feature ID is the same for all three sub-layers, but each has a suffix after the ID indicating the layer (e.g. id=a745g82h97b773e36e32d18&sublayer=14, id=a745g82h97b773e36e32d18&sublayer=15, etc.) where ID is the same but sublayer ID changes.  

 

Why are you trying to overwrite a single layer within the feature service? Are there schema changes to that layer?

If there are no schema changes, you can target that sublayer and truncate it (using FeatureWriter), then insert the new data (other sublayers remain untouched as long as you don't connect the layers you do not want to change to the FeatureWriter).

 

If there are schema changes, it’s more involved. You can use HTTPCaller to call the ArcGIS REST addToDefinition / deleteFromDefinition / updateDefinition operations to add/remove fields or modify aliases/domains. Changing field data types on an existing layer isn’t supported (https://support.esri.com/en-us/knowledge-base/faq-is-it-possible-to-change-the-field-data-type-create-000031634), I am not too sure about changing geometry of an existing layer (I’ve never tried).

More Information on ArcGIS REST endpoints:


Thank you for your response!  Yes I am only trying to truncate and insert as you've described; there is no schema change.  In my case, it’s merely convenient to publish the three layers from ArcPro as they are related and so if published together as a Web Layer from Pro, in AGOL they remained grouped together in a single feature service.  Only one of my three sub layers will change with any regularity, so that’s why I’m trying to create a job targeting only one of them.  

I’ve often used FME to update single feature services that contain only one layer, but have never attempted to update one or more sublayers in a service that contains multiple layers.  So my disconnect is with understanding how to handle sub layers in FME.  When I select the parameters button within FeatureWriter, it allows me to select a feature service, but not individual sub layers within a feature service.  In my example, the feature service name is Road Rock and there are three sub layers beneath that named Road Rock, Road Rock Yearly, and Road Number (it’s confusing because one of my sub layer names shares the same name of the feature service). 

To keep the discussion cleaner, perhaps it would be easier to refer to the sub layer “Road Number” as the one I would like to update.  So then if I wanted only to update “Road Number”, where do I indicate that in the parameters?  

In your screen shot, I can see Layer1 and Layer2 in the Feature Types window, and you’ve selected Layer2 in the Layer Name field.  However, for me that’s where my feature service name populates “Road Rock”, not the sub layer name “Road Number”.  I don’t see “Road Number” in any sort of drop down menu to populate the Layer Name parameter value.  I could type it in there I suppose, is that what you did?

Just for reference, here’s a screen shot below of where the option to publish a feature service with multiple sublayers exists within ArcPro; see note where it states all data layers in the map will be published.  Conversely, to publish a single layer, you’d just choose Sharing from the right-click context menu of the layer in the TOC.

 

 


I appreciate the context!

Personally, I connect my layers directly to the FeatureWriter’s “Connect Input” port and leave attribute definition on Automatic. If they share the same layer name, then FME/ArcGIS will use the existing layer as long as “Feature Service Handling” is set to “Use Existing.”

 If you’re concerned about using Automatic attribute definition, click the plus icon, select “Import from Dataset...”, and configure the parameters in the pop-up dialog (use the same Feature Service you configured for the FeatureWriter, and under “Constraint”, specify the layer you want to write to). This will add an entry to the Feature Type list, which you can then connect to the input port you want to truncate and write to.

 


Fantastic, thanks for your detailed reply; much appreciated!  Following your instructions I was able to find and select the sub layer I needed.  Sometimes GIS folks like me just need a visual.  😁

This duplicates what you’ve already shared, but here’s my screen shot with steps I followed after first selecting the feature service.  I’m currently using 2024.2 so not sure if these menus are the same in current version given 2025.X introduced a number of interface changes.  

 


Reply