Skip to main content
Solved

How update existing table saved to PostGis with FME


gennine
Contributor
Forum|alt.badge.img+3

Hi, I have acheived an attribute update in an existing table in QGIS.
The transfert to PostGis works well when I use "Insert" and "Drop and Create" handling.
However, I can not figure out the operation with "Update" and "Use existing" in order to properly transfert the updated value of the attribute code_dep.

 

Any help is welcome.

Best answer by becchr

‘match columns’ are the field(s) used to identify the record to update, so in your case it should be set to ‘id_dep’ as it is the key field in your data?

View original
Did this help you find an answer to your question?

6 replies

j.botterill
Influencer
Forum|alt.badge.img+37
  • Influencer
  • April 10, 2024

Hi Gennine, When matching key attributes between two tables or in your case, performing an update where the match column compares values coming into the writer with that of the database table, it is important to consider the null state. I can see the code_dep has <missing> value which the update operation may struggle with to match on

Can you include your transaction log and any warning/error messages


gennine
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • April 10, 2024

Thank you Botterill for your prompt responsiveness. I am attaching part of the log.
But I think that even if it is a NULL or Missing value, normally the transfer of values to PostGis should be executed identically.
I tried other non-NULL values but without success.


becchr
Influencer
Forum|alt.badge.img+25
  • Influencer
  • Best Answer
  • April 10, 2024

‘match columns’ are the field(s) used to identify the record to update, so in your case it should be set to ‘id_dep’ as it is the key field in your data?


gennine
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • April 10, 2024

Many thanks becchr. One last point, updated values to Missing or NULL (in the field for example code_dep) are not handled with this method (old values remain unchanged).


becchr
Influencer
Forum|alt.badge.img+25
  • Influencer
  • April 11, 2024
gennine wrote:

Many thanks becchr. One last point, updated values to Missing or NULL (in the field for example code_dep) are not handled with this method (old values remain unchanged).

mmm, missings might not update because “those values don’t exist”, but null’s should update I guess

you could use an NullAttributeMapper to change all the missings to nulls or empty strings, those values should update if I’m right


gennine
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • April 11, 2024

It works very well. Many thanks for your valuable advice.


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