Skip to main content

I'm attempting to update a ArcGIS Portal feature service using the ArcGIS Portal Feature Service in Dynamic mode and after the workbench finishes the original features remain unchanged. I'm expecting to see the features locations shifted slightly, various attribute values changed and my user account name in the last_edited_user attribute with today's date in the last_edited_date, but I see none of these.

My workflow includes...

Reading features from a ArcGIS Portal feature service with a FeatureReader

Joining each feature with it's schema via the Schema port plus a FeatureMerger joining on fme_feature_type and fme_feature_type_name

Also reading the schema in via the Workspace Resources, which I believe will work better for what I'm trying to achieve

Making requested changes to the data

Ensuring all attribute names are lowercase to match the feature service

Writing the revised features using the ArcGIS Portal Feature Service writer in Dynamic mode and these settings...

Layer Name: the original fme_feature_type

Geometry: From Schema Definition

Schema Sources: I've tried the ArcGIS Portal featuers from the Workspace Resources and the Schema From Schema Feature

Writer Mode: UPDATE

The Workbench summary says that features were written, but I'm not seeing that in the original data that I'm attempting to UPDATE.

If I swap to using the Schema From Schema Feature it gets worse because during the processing I join data from a separate table and the Schema information and the attributes no longer match up correctly.

I have checked that the attribute names are correct and that the objectid is available for the UPDATE so I'm not sure what the issue is. What I'm expecting is if I have a attribute field called "Notes", which is initially empty, then add some text into the Notes attribute via FME and finally send the objectid and updated Notes to the ArcGIS Portal Feature Service writer set to UPDATE then that new Notes text should appear in the original ArcGIS Portal Feature Service.

It would be great to know what's going on here as I suspect solving this will be crucial to pushing automated data updates to our hosted feature services.

Thank you for your help.

 

 

 

Hi @jamess,

I suspect the problem is arising from the schema features coming from the FeatureReader being joined to the data features.

When using the FeatureReader and using the schema feature, this transformer adds a special attribute and value:

fme_schema_handling = ‘schema only’

This attribute tells the writer to use that feature as a schema and then remove it from the output. Thus, why you may not be seeing updates is because of the FeatureMerger used earlier on in your workflow.

This special attribute and value could be the root of the issue you are seeing, as your workflow is merging data features and schema feature in the workspace. When this occurs, the schema feature(s) would be dropped when written especially when using a dynamic writer.

I would recommend removing the fme_schema_handling attribute entirely so that the data is not dropped/nor updated first merged data feature is not dropped by the writer.

You could still use "Schema From Schema Feature" in the writer, if you send the "schema" feature direct from the FeatureReader to the Dynamic writer.

 

It may help to review this article about dynamic writing when the destination schema is coming from a schema feature.

Hope this helps

- Andrea


Hi @jamess,

I suspect the problem is arising from the schema features coming from the FeatureReader being joined to the data features.

When using the FeatureReader and using the schema feature, this transformer adds a special attribute and value:

fme_schema_handling = ‘schema only’

This attribute tells the writer to use that feature as a schema and then remove it from the output. Thus, why you may not be seeing updates is because of the FeatureMerger used earlier on in your workflow.

This special attribute and value could be the root of the issue you are seeing, as your workflow is merging data features and schema feature in the workspace. When this occurs, the schema feature(s) would be dropped when written especially when using a dynamic writer.

I would recommend removing the fme_schema_handling attribute entirely so that the data is not dropped/nor updated first merged data feature is not dropped by the writer.

You could still use "Schema From Schema Feature" in the writer, if you send the "schema" feature direct from the FeatureReader to the Dynamic writer.

 

It may help to review this article about dynamic writing when the destination schema is coming from a schema feature.

Hope this helps

- Andrea

Thanks Andrea. That's definitely going to be useful for me working with data hosted in ArcGIS portal. I believe that's exactly what was happening with the schema features and explains why it was completing without the new information appearing.

In the end I switched to reading the schema as a workspace resource, which threw up a new error to do with an attribute using double as the data type rather than the expected integer. This attribute isn't required in my workflow so after removing it everything worked as expected.

Thank you for your time.


Thanks Andrea. That's definitely going to be useful for me working with data hosted in ArcGIS portal. I believe that's exactly what was happening with the schema features and explains why it was completing without the new information appearing.

In the end I switched to reading the schema as a workspace resource, which threw up a new error to do with an attribute using double as the data type rather than the expected integer. This attribute isn't required in my workflow so after removing it everything worked as expected.

Thank you for your time.

Great to hear! Thanks for letting me know.

- Andrea


Reply