Skip to main content

Hi,

My goal is to read multiple (unknown) Hosted Feature Layers (HFLs) from an AGOL group and write those to ArcGIS Enterprise (11.3).

 

I can successfully specify a single HFL in my FeatureReader and using an Automated schema in my FeatureWriter, specify each individual layer and write it to Enterprise. As I need this to work for multiple HFLs, most with multiple layers, I need to use a dynamic schema in my FeatureWriter. As soon as I do this, my workbench fails.

 

Every time I switch to a dynamic writer, using the fme_feature_type as layer name and schema from schema feature, the workbench fails due to these errors:

Message Type: fme::internal::_v0:🇵🇾:Exception
Python Exception <KeyError>: 'My_HFL_Name'
ARCGISPORTALFEATURES writer: An error has occurred. Check the logfile above for details
 

I’ve tried everything I can think of to get this working and cannot understand what I’m possibly doing wrong. Any help would be greatly appreciated.

 

My workbench (so complex...)

 

AGOL HFL FeatureReader

 

Enterprise Feature Service Parameters

 

Enterprise FeatureWriter Parameters

 

It might be the order the features are entering the writer. Its possible that not all schema features arrive to the writer before the first non-schema feature though I am not sure that is your problem because I am not familiar with the error you are seeing.

To test this add 2 AttributeCreators to your FeatureReader output ports, one for the schema features and one for the regular features. Create an attribute called order, the value should be static, for your schema features you can choose 1, for your regular features you can choose 2. then add a sorter and combine the two datastreams together and sort on order, ascending. Connect the sorted output to the FeatureWriter.

 


Thanks for replying ​@birgit.

I like they way you’re thinking, but unfortunately, this didn’t work. Same error...


I believe I’ve fixed this issue with help from this post: 

 

I followed the instructions to merge the schema and data features, and use the fme_feature_type_name for my dynamic layers. I also modified my portal writer to “Create feature service using file upload” = Yes. This works for me as I’m always overwriting the entire service.

Thanks,

Leon.


Reply