Hi,
I've been processing data and writing outputs to PostGres tables that are created by the writer. I've created a number of writer feature type by copying an existing feature type and renaming them. Every writer feature type has a unique name, followed by a parameter indicating the year. However, this seems to cause an issue where FME considers the copied + renamed feature type to be the same as the original on some level, and refuses to write to it.
FME 2017.1 (build 17539) gives a somewhat vague warning about feature types but continues processing:
2018-07-04 10:42:52| 102.1| 0.0|WARN |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2018-07-04 10:42:52| 102.1| 0.0|WARN | Features not written - verify feature type fanout/dynamic settings
2018-07-04 10:42:52| 102.1| 0.0|WARN |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2018-07-04 10:42:52| 102.1| 0.0|WARN | (Check that fanout/dynamic feature type attribute exists and has a value)
2018-07-04 10:42:52| 102.1| 0.0|WARN |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2018-07-04 10:42:52| 102.1| 0.0|WARN | 75173
2018-07-04 10:42:52| 102.1| 0.0|WARN |==============================================================================
2018-07-04 10:42:52| 102.1| 0.0|WARN |Total features not written 75173
2018-07-04 10:42:52| 102.1| 0.0|WARN |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FME 2018.1 beta (build 18482) gives an actual error message and halts translation:
2018-07-04 10:01:39| 12.5| 0.0|ERROR |Cannot have multiple factories with the same name. Multiple factories were assigned the name 'y__Year__Export.OCHeader_2017_POSTGRES_1_Prepper'
2018-07-04 10:01:39| 12.5| 0.0|INFORM|Translation FAILED with 1 error(s) and 0 warning(s) (0 feature(s) output)
2018-07-04 10:01:39| 12.5| 0.0|INFORM|FME Session Duration: 15.6 seconds. (CPU: 4.3s user, 6.3s system)
2018-07-04 10:01:39| 12.5| 0.0|INFORM|END - ProcessID: 9764, peak process memory usage: 326676 kB, current process memory usage: 326676 kB
Cannot have multiple factories with the same name. Multiple factories were assigned the name 'y__Year__Export.OCHeader_2017_POSTGRES_1_Prepper'
Program Terminating
Translation FAILED.
Writing to PostGres and redirecting to Inspector give the same results (the data doesn't show in Inspector either).
I'm assuming I can probably fix this by creating new feature types from scratch instead but thought this was worth pointing out as a potential bug.
UPDATE: I opened the workbench in NotePad++ and searched for the factory named "y__Year__Export.OCHeader_2017_POSTGRES_1_Prepper". This turned out to be an Inspector. Deleted all inspectors from the workbench and now 2018 behaves the same as 2017.
I've also recreated the feature types for the missing tables. Unfortunately this did not solve the issue; if anyone has any bright ideas (or regular ideas) they're appreciated.
UPDATE2: This is odd. In the Navigation pane, when I open the Postgres writer and look at its feature types, only 9 are listed - the ones that are writing successfully. The others are not listed here - even though their properties show that they belong to this writer. Are these orphaned feature types?
UPDATE3: added the workspace below - created in FME2017 (the 2012 in the filename refers to a batch of data). Note that you won't be able to run the workspace as is because of the database connections.