Skip to main content
Question

FeatureWriter dropping features


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

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
Evangelist
  • 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

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+28
  • June 5, 2019
nielsgerrits wrote:

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.


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