Skip to main content
Question

SQL Server Non-spatial query not adding records to destination table

  • May 11, 2018
  • 3 replies
  • 9 views

This is my first attempt to simply read from a SQL Server view and write to an existing non-spatial table. The process runs and reports success and 31 records added to destination table but, on checking the destination table, they are not there. Is there a commit of the transaction that's not happening or something?

Log reports "Stored 31 feature(s) to FME feature store file `C:\\Users\\gisadmin\\Documents\\FME\\Workspaces\\UpdatePFEditorsTracking_log.ffs'"

Is this FFS the only place the records were added?

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.

3 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • May 11, 2018

Hi @hamar,

 

 

Hmm I see in the log that there were 837 warnings:
Translation was SUCCESSFUL with 837 warning(s) (31 feature(s) output

But I don't see any warnings in the log. Would you run this again but before you do can you make sure you have Error and Warnings turned on in logging. Tools>FME Options>Translation then have your settings match what is below.

 

This should give you some more information about the data. Its likely that there a a particular column that is causing some trouble here.

0684Q00000ArPddQAF.png


  • Author
  • May 11, 2018

@MattAtSafe

I found the problem in a warning saying that records could not be inserted as it was trying to insert nulls in a column that doesn't allow nulls. I guess I didn't look to the warnings due to the fact that FME Workbench reported success (31 records output). Very misleading if it couldn't actually write any records.

Thanks for the quick response.


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • May 11, 2018

@MattAtSafe

I found the problem in a warning saying that records could not be inserted as it was trying to insert nulls in a column that doesn't allow nulls. I guess I didn't look to the warnings due to the fact that FME Workbench reported success (31 records output). Very misleading if it couldn't actually write any records.

Thanks for the quick response.

Oh, great to hear you found the problem! Yes I couldn't agree more with you on that point. A common method when working with databases is to with Staging Tables followed by validation then a push to production. Here's an article which discusses some of those ideas - I hope it's helpful.

 

https://knowledge.safe.com/articles/44559/using-the-featurewriter-transformer-with-your-data.html