[Qgis-user] Unable to run an ogr2ogr within a QGis action

didier peeters dpeeter1 at ulb.ac.be
Wed Oct 31 09:04:09 PDT 2018


Hello,

I've written a simple ogr2ogr command to read a specific csv file and load it into a specific Postgis table.  When I execute it in the terminal it works fine but when I put it in an action in QGis 3.4 I get a message saying 'Unable to run command ‘.  

The command is : ogr2ogr -append -f "PostgreSQL" PG: "host=server_ip user=myself dbname=somedb" -nln someschema.sometable test_/path/to/thefile.csv

The action is of type Generic, has both Layer and Canvas scope (nothing else), clicking its icon in the attributes table gives me the above error message, clicking it through the action icon in the canvas toolbar leads to nothing.  

The idea here was simply to take advantage of QGis to load those data in a user friendly way, after which the data would be processed by some trigger functions in Postgresql and finally displayed in the canvas.  

Why doesn’t it work ?

Didier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20181031/b46a943c/attachment.html>


More information about the Qgis-user mailing list