Do you have any idea how load Oracle spatial data to QGIS with using the PyQGIS? Is it possible? I try:
uri = QgsDataSourceURI()
uri.setConnection("*host*", "1521", "*database*", "*username*", "*password*")
sql = "(SELECT fid, geom FROM target.ms_ft_bh095_v)"
uri.setDataSource("",sql,"GEOM","","fid")
layer = QgsVectorLayer(uri.uri(), "test", "oracle")
The error message is: ORA-00972: identifier is not long. But FID max value is cca 20 000. Is Oracle driver correct with this syntax? Ms_ft_bh095_v is view in this moment.
No comments:
Post a Comment