Skip to main content

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.

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


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.


‘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?


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).


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


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


Reply