Skip to main content

EDIT:

I have created a text parameter with value contractor_log and used that as the layer name in both, this seems to have fixed the problem (not fully tested yet). This seems to be more of  a hack than a proper solution. Is there a 'more correct' way I should be doing this?

 

Hey, 

I have a workbench that manipulates some input data, then it checks an arcgis online table (contractor_log) to see if this particular mobile number exists in the AGOL table. I need the AGOL table to be UPDATED if the mobile number exists in the table, but if it is new (non existent in the AGOL table) I need FME to INSERT a row into this AGOL table, which is a dozen field to insert.

 

I have inserted the AGOL WRITER into my workspace, setup my UPDATE writer which works perfectly, I now wish to duplicate this writer to setup my INSERT, but when I create a copy of this it must contain a unique layer (table) name, which is not ideal, as I want both writers connecting to the same AGOL Layer/table.

 

See this photo, it adds the 00 to the duplicated table, I cannot use it as it stands as I get the error 

ArcGIS Online Feature Service Writer: Could not find a layer/table matching feature type 'contractor_log00'

imageAny ideas how I can write either INSERT or UPDATE within the same workspace?

 

Hey,

You are talking about quite a common scenario here, with data changing and new data popping up all the time. And yes, you can handle this kind of situation with FME. Of course :-)

You should have a look at the ChangeDetector transformer which will add the fme_db_operation attribute to the features.

 

There is quite some documentation available on this topic in the FME Community. So, with the help of these articles and tutorials you should be able to get it up and running in your case:

And in FME 2022.1, the ability to perform UPSERT operations when writing out to ArcGIS Online Feature Services has been introduced: Updating ArcGIS Online Feature Services using UPSERT

Please let us know whether you manged to solve the issue.

 

Cheers,

 

Egge-Jan


Hey,

You are talking about quite a common scenario here, with data changing and new data popping up all the time. And yes, you can handle this kind of situation with FME. Of course :-)

You should have a look at the ChangeDetector transformer which will add the fme_db_operation attribute to the features.

 

There is quite some documentation available on this topic in the FME Community. So, with the help of these articles and tutorials you should be able to get it up and running in your case:

And in FME 2022.1, the ability to perform UPSERT operations when writing out to ArcGIS Online Feature Services has been introduced: Updating ArcGIS Online Feature Services using UPSERT

Please let us know whether you manged to solve the issue.

 

Cheers,

 

Egge-Jan

Amazing answer, the change detector sounds like it will do exactly what I want! I will see how I go with that. Thanks again for all the links!


Reply