I have millions of records and hundreds of tables in several file geodatabases..
The tables name in these FGDBs are all same but just in different areas.
For instance, the Admin table, you see below, is California data (but the FGDB named as file.gdb), and there is another Admin table in New York (also the FGDB named as file.gdb) data
To have better access and use st_* functions, I was importing the FGDBs to my PostgreSQL one by one. (ultimately I am going to write a
bash script to automate this)
As far as I know, once the tables are imported to PostgreSQL I can append tables using
-update -append options.
So, this is my command below
ogr2ogr -update -append -progress -f "PostgreSQL" PG:"host=localhost port=5433 dbname=postgres user=postgres password=postgres" file.gdb -lco GEOMETRY_NAME=shape -t_srs EPSG:3857
but this gives me this error message
Warning 1: Layer creation options ignored since an existing layer is being appended to. ERROR 1: ?ERROR 1: INSERT command for new feature failed. ?ERROR 1: Unable to write feature 1 from layer Admin. ERROR 1: Terminating translation prematurely after failed translation of layer Admin (use -skipfailures to skip errors)
Using -skipfailures seems to be dangerous because it might skip some of my data.
Will there be another solution to breakthrough this issue?