At 3.8.3, I need to to append one Geopackage layer to another Geopackage layer, both in the same Geopackage. Let’s say my Geopackage has two layers, A and B. How do I append B into A?


I just found the answer. First, make sure that both layers (source and target) have identical schemas. In the Table of Contents, right-click the source layer (In my example, layer B) and Export > Save Features As...

Now, the Save Vector Layer… window appears. Here, drop-down Format and select Geopackage. Under File name, enter the Geopackage’s path and name. Under Layer name, enter the target layer that you are appending to (in my case, this is “A”). Make sure that the source and target layer CRSs are identical! Under Select fields to export and their export options, uncheck FID (the append process will update the target layer's FID values).

You will then be notified that The layer already exists. Here, click the Append to Layer button.

The Select Vector Layers to Add… window will appear. Do not click any of the layers; simply click the Ok button.

Voila! The source layer has been appended to the target layer.

EDIT: If you have the target attribute table open when the append operation occurs, it does not appear to automatically update. Thus, you'll have to close the table and re-open, which refreshes it, now displaying the appended records.

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.