Skip to main content
Question

FeatureWriter dropping features

  • June 3, 2019
  • 4 replies
  • 100 views

soothsayers
Contributor
Forum|alt.badge.img+7

Hi,

I have a strange issue when writing data using the FeatureWriter (Build 19238 - WIN64). This is possibly something stupid I'm missing.

I am reading from various PostGIS tables, performing a clip and then writing out to other new PostGIS tables in a different schema. This part is fine.

Later in the process I read these newly created PostGIS tables, perform some Geomertry validations on the data and then overwrite the tables I've just read from. For every dataset I am losing one or two features per table when rewriting, whether that is two features going down to one, or 11,050 going down to 11,048! I have skipped the geometry validation step so I'm just reading in and writing out again and still have the same issue. I have also changed the writer to FileGDB with the same result. Just as the data goes into the FeatureWriter the correct number of features (e.g. 11,050) are going in just not all being saved.

Thanks

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.

4 replies

Forum|alt.badge.img
  • June 5, 2019

It might be a clue to know if you are losing the first or the last object that is going in to the writer. So as a first step, put a Counter before the FeatureWriter and check the resulting table to see if you're missing feature number 1 or feature number 11050.


david_r
Celebrity
  • June 5, 2019

I would start by connecting an Inspector (or a Logger) to the Summary port of the FeatureWriter and check that the feature counts are what you expect.

Also double-check the FME log for any warnings about dropped features.


nielsgerrits
VIP
Forum|alt.badge.img+64

It feels familiar but not sure what caused it. Something might go wrong with the FeatureWriter generating the insert statements. @jkr_da ?

Can you check the PostGIS server logs? I would create a small batch (like 10 records) to test with, faster to iterate and easier to check the logs.


jkr_wrk
Influencer
Forum|alt.badge.img+36
  • June 5, 2019

It feels familiar but not sure what caused it. Something might go wrong with the FeatureWriter generating the insert statements. @jkr_da ?

Can you check the PostGIS server logs? I would create a small batch (like 10 records) to test with, faster to iterate and easier to check the logs.

It's strange that the FileGDB also looses features. My first guess would be the primary key is double.

 

I would not use a Rewrite, but use an insert, update and delete FeatureWriter instead. Or write to a new table.