Skip to main content
Question

How to specify Feature Operation parameter in FME Objects Writer

  • November 2, 2015
  • 1 reply
  • 30 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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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