I have 50 mbtiles
files which is in Raster format. mbtiles
file is basically an SQLite
file. I have successfully merged them through SQLite IDE using the following query.
ATTACH 'path/to/db2.mbtiles' AS db2;
INSERT OR REPLACE INTO map SELECT * from db2.map;
INSERT OR REPLACE INTO images SELECT * from db2.images;
But I am trying to do it using a shell script. Here what I am doing in my commandline. At first, I am opening an SQLite database using the sqlite3 01.mbtiles;
command. It is opening the database but in the schema, there is no image
and map
table.
When I am attaching another SQLite DB using attach 02.mbties as db2;
it is most probably attaching as there is no shell output. After that when I am trying to merge data using
INSERT OR REPLACE INTO map SELECT * from db2.map;
INSERT OR REPLACE INTO images SELECT * from db2.images;
It is returning
Error: no such table: map
Error: no such table: images
Can it be merged using commandline?