Skip to main content

Hello everyone.

I have a problem with writing an SDE database that sits on top of postgis DB.

I manage to connect in the FME to the database both from the postgis / postgres readers and from the sde reader.

I can read the data, the problem is that I can not write properly.

I want to update the database, and no matter what I do, I do not see the changes in th database.

It is divided into two parts:

When I write directly to postgis, I have a lot of warnings, but I was told that Total Features Written 1

As it should be.

But in practice I do not see the changes in the database at all!

And when I write down to sde, it gives me lots of Errors, but Total Features Written                            1 as it should be,

but still no change in the DB.

I tried every possible variation in feature operation, insert, update- and nothing changed.

Only when I did an experiment with delete, it managed to delete the features for some reason.

Does anyone have an idea how to overcome this and write directly to the database?

The log files are attached here.

 

Thank you!

Yeah the summaries are not very helpful when it comes to writing sometimes.

 

From your log file it mentions that there is an invalid attribute. "housenum", there is a " - " character present but the output table has been defined to expect a number. A " - " is not a valid number and so FME can't write the data

You can do some checks on the attributes values and types with an AttributeValidator.


I'm quite sure you need to use the SDE writer, not the PostGIS writer. This is because SDE manages a bunch of system tables around it. (You can, technically, use the SQLExecutor to change stuff. But if you don't know what you are doing, I think the best advise is to use the specific writer.)

 

The reason writing to SDE fails is because row 115 in the log:

2021-09-26 09:23:26|   2.2|  0.0|ERROR |The invalid value '-' was supplied to the field 'housenum' for the table/feature class 'sde.תחנת_שאיבה'

The field 'housenum' probably needs integer(s).

 

The reason why it says Total Features Written = 1 and no changes in the target table is to be found in row 644:

2021-09-26 09:23:26|   2.3|  0.0|INFORM|Transaction #1 rolled back. Rerun translation specifying transaction #0 for the keyword 'TRANSACTION'

Because one of the records failed, the complete transaction is rolled back. The way how the writer behaves can be changed by the setting Transaction Type under the writer parameters.


Sorry, it's an old post but I may have an answer that is important to you:

PostgreSQL expects the database field names in lower case characters only. Use the BulkAttributeRenamer transformer to make them all lower case, otherwise it looks like the data is being written, but it won't be.


Thanks a lot @michaeljb YES, the lower case is the cause for FME malfunction. Really love the bulk transformer, much appreciate your great sharing!!! Cheers, Jian ✌️


Reply