Skip to main content
Question

How to specify Feature Operation parameter in FME Objects Writer

  • November 2, 2015
  • 1 reply
  • 18 views

Forum|alt.badge.img
Hi

 

We have some java code that used FME Objects 2013 and we upgraded it to 2015. Some of our tests started to fail. When I investigated I found that in the log it says

 

 

WARN |MS SQL Server (Spatial) Writer: The fme_db_operation attribute value 'DELETE' on feature conflicts with Feature Operation 'Insert'. Rejecting feature

 

 

In documentation there is a description of Feature Operation parameter but I tried to specify it in various ways and it still didn't work. For example:

 

 

IFMEStringArray params = fmeSession.createStringArray();

 

IFMEStringArray directives = fmeSession.createStringArray();

 

params.append("Feature Operation"); // tried FEATURE_OPERATION etc.

 

params.append("fme_db_operation");

 

IFMEUniversalWriter fmeWriter = fmeSession .createWriter("MSSQL_SPATIAL", directives);

 

fmeWriter.open("fme_datastore_test", params);

 

...

 

fmeFeature.setStringAttribute("fme_db_operation", "DELETE");

 

fmeWriter.write(fmeFeature);

 

 

What am I doing wrong? It's hard to understand from documentation what actual parameter's name is ("Feature Operation"?) and how "format parameters" are passed to writers - as parameters in 'open' or as directives in 'createWriter'?

 

 

Thank you.

1 reply

david_r
Celebrity
  • November 2, 2015
Hi

 

 

Have a look at this post regarding how to use the FMEDialog() class to show you the syntax for the different directives.

 

 

David

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