Hi
I am having problems with importing from a Postgres database:
Command (run on omnisci server)
java -cp /opt/omnisci/bin/omnisci-utility-5.10.2.jar:/tmp/postgresql-42.2.5.jar com.mapd.utility.SQLImporter -u admin -p HyperInteractive -db omnisci --port 6274 -t tbl_import -su postgres -sp password -c “jdbc:postgresql://192.168.20.165/db_source:5432” -ss “select * from public.tbl_source”
-
I’ve assumed this JAR is the correct one- other posts on the forum have a different path/name
-
192.168.20.165/db_source:5432 is my (remote) Postgres server, database & port respectively. Also tried in the format
jdbc:postgresql://host:port/database
-
public.tbl_source is obviously the source table
error
java.sql.SQLException: No suitable driver found for jdbc:postgresql://192.168.20.165/db_source:5432
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:702)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at com.mapd.utility.SQLImporter.executeQuery(SQLImporter.java:360)
at com.mapd.utility.SQLImporter.doWork(SQLImporter.java:348)
at com.mapd.utility.SQLImporter.main(SQLImporter.java:333)
Notes
- I’ve got the libpostgresql-jdbc-java package installed
- It is not clear from the documentation if this utility will create the destination table in omnisci- or do I need to do that first ?
- Alternatively- is there a way to define datatypes when using the importer in Immerse ? The problem I’m having is that timestamp or datetime columns from a shapefile are imported as strings
thanks
Andrew