So I decided to export the SQL data as CSV and then imported in Excel.
I then checked the XML format from SMS backup and Restore, made it match, exported it as XML from Excel.
And finally you can just restore it.
I recently did this to restore and merge my SMS messages from a previous NANDROID backup stored on my Linux PC that I could no longer boot in to using my phone.
I extracted the file /data/user_de/0/com.android.providers.telephony/databases/mmssms.db from the data.ext4.win002 tar archive of my NANDROID backup.
I logged in to adb shell on my phone and made a ...
Assuming you have your local files all, databases and images.
First deactivate google drive.
Open google drive.
Top left menu, backups, deactivate Google Drive WhatsApp backup
(option to delete also, not necessary)
Copy all files over to WhatsApp folder on phone
Re-do the login procedure as usual.
In theory that's it.