Closed FreddiePalfreman closed 5 months ago
Hey Freddie - hope you found a resolution for this.
For others finding this page, please try checking to see if your shapefile (or geodb, geojson etc.) is valid and can be read by GDAL by running something like this in a separate cell:
%sh ogrinfo <<filename>>.shp
@sllynn My issue was reading the shapefiles straight from the ADLS mount point. When I copied the files from the mount into my Databricks workspace with dbutils.fs.cp()
, Mosaic's vector file readers worked a charm! So it seems that the file was valid, it is just unable to read files from a mount point.
I'm using Mosaic 0.4.1 on DBR 13.3 LTS (photon enabled), with mounts to ADLS Gen2 containers.
I followed the GDAL installation guide with the default options for
setup_gdal()
, then added the init script in my cluster settings and restarted.Then I've followed the Mosaic + GDAL Shapefile Example:
Using the same Shapefiles as in the example, I can see the zipped and unzipped versions in DBFS:
However I get a
NullPointerException
when I try and read the file:I've tried with other forms of the file path (
/dbfs/mnt/
,/mnt/
) but these give the same error. I've also tried the native Spark reader (spark.read.format("shapefile").load()
), but this also produces the same error.