Skip to main content
Question

SDE Versioned Edits - INSERT vs. UPDATE

  • April 21, 2020
  • 6 replies
  • 126 views

agelfert
Contributor
Forum|alt.badge.img+8

I have inherited some older workbenches/server workspaces and am noticing some issues with writer parameters, specifically where ArcSDE connections are concerned. For examples, I found that "accidentally" saving an old FMW in FME 2018 Desktop when the FMW leveraged fme_where without the explicit setting in the WHERE field, wreaked havoc by turning some updates into inserts. I have fixed that by cleaning up the workspace.

1) Now, I'm looking at a workbench that is doing versioned editing in SDE and has the Writer set to 'INSERT' and 'CREATE IF NEEDED'. Yet it's doing updates. How is that possible - what am I missing?

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.

6 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • April 21, 2020
Is the fme_db_operation attribute set in the workspace?

That attribute can have the values INSERT, UPDATE and DELETE and has priority over the Writer mode in the feature type and writer definitions.

That could explain why it is updating instead of inserting records.

Hope this helps.


agelfert
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 78 replies
  • April 22, 2020

@erik_jan Erik, thanks for chiming in. Sorry forgot to mention that I did check for that obvious parameter and I don't see it being used at all in the workbench in question. It's not being set explicitly anywhere in the pipeline and it shows up as not "exposed" in the writer. If this were using the new-style. I'd expect to sede "fme_db_operation" where I now see 'Insert'. Anywhere else I can look?


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • April 22, 2020

@erik_jan Erik, thanks for chiming in. Sorry forgot to mention that I did check for that obvious parameter and I don't see it being used at all in the workbench in question. It's not being set explicitly anywhere in the pipeline and it shows up as not "exposed" in the writer. If this were using the new-style. I'd expect to sede "fme_db_operation" where I now see 'Insert'. Anywhere else I can look?

Have you tried writing to the Data Inspector instead of to the table (Writers menu > Redirect to Inspection Application).

That would show you if the fme_db_operation attribute is set.

Hope this helps.


agelfert
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 78 replies
  • April 22, 2020

Have you tried writing to the Data Inspector instead of to the table (Writers menu > Redirect to Inspection Application).

That would show you if the fme_db_operation attribute is set.

Hope this helps.

@erik_jan Erik, I m must be missing something. I don't want to look at the output. I know what it's doing. I'm trying to find out why or if there is a hidden setting I'm not seeing. Thanks for your feedback!!!


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • April 22, 2020

@erik_jan Erik, I m must be missing something. I don't want to look at the output. I know what it's doing. I'm trying to find out why or if there is a hidden setting I'm not seeing. Thanks for your feedback!!!

Any chance you can upload a workspace for review? Seems the easiest way to help.


agelfert
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 78 replies
  • April 23, 2020

Any chance you can upload a workspace for review? Seems the easiest way to help.

Wish I could but I can't upload the workbench. -- What I'm seeing is that running the workbench in Desktop creates inserts but running it after publishing in FME Server it does updates. Boggles my mind.

I'm going to just overhaul this completely, update any readers/writers/transformers and republish. I was hoping to figure out why it does this, so that I can hunt down any other potential candidates like it. But looks like this falls in the "fixer upper" category of workbench.