0

I have a PostGIS database with which I am currently using QGIS to manage the layers. Say I have a layer in PostGIS that I want to do a join to to add new data in. Is it possible to do this join in-situ without having to download the layer locally, do the join and re-upload the layer, overwriting the previous one?

If this isn't possible, is the best alternative to write a script to handle the downloading, joining and re-uploading all together?

3
  • could you use a view? – Ian Turton Jan 11 at 13:13
  • Download DBeaver, connect to your postgresql database, write a query joining the data and create a view out of the result. Add the view to qgis. – DPSSpatial_BoycottingGISSE Jan 11 at 18:52
  • @BERA - I wanted QGIS to be the one to handle the downloading and re-uploading without me explicitely having to save a copy of the data, manipulate it locally and re-upload. This is effectively what it already does when making basic attribute table edits but doesn't seem to work in the same way for joined fields. – Jamie Jan 12 at 12:25
0

This may not be best practice but I have found that the easiest option in my case is to just create a new field that mimics the joined fields. This avoids having to create a whole new layer which needs to be saved and re-uploaded.

Hopefully using this it will then be easier to create a script to automate the join and duplicating the fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.