Hi,
I'm using a FeatureWriter to insert data into a PostgreSQL database. When certain features can't be converted into the desired data types, FME drops them without terminating the translation.
The logger gives a message in blue:
"Value of attribute 'test' could not be converted to type 'bool'. Feature will be logged and skipped"
However, the issue lies in trying to capture this scenario and terminate the translation.
Despite dropping some features, the FeatureWriter when outputting the summary feature still contains the FULL COUNT against the '_total_features_written' attribute. I was intending on comparing this number to a count of incoming features to check for a difference. Now the only other way I can think of is querying the database immediately after and getting the written feature count that way.
I guess I have two questions:
1. Is there an inbuilt way to halt the translation when a feature is dropped like this?
2. Is the _total_features_written count including the dropped features a bug or by design? It clearly does not reflect the actual number written to the database so it's at least misleading. Looking at other topics on this matter it seems like it should not be including the dropped features?
Thanks
Tested on FME 2019.1.0.0 and FME 2019.1.1.0
& PG 11.4
Best answer by markatsafe
View original