-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShapefileReader with Unity Catalogue on Databricks #1531
Comments
Adding the following config when you create your sedona object should make it work, plus pre-pending
|
Ah I didn't realize that was possible. I'll give it a go, thanks. |
I did this:
Then this
But I get this error:
|
@JimShady The correct way to create SedonaContext on Databricks Python (since v1.4.1) is
The code from @furqaankhan is for Sedona on OSS Spark. |
The path to the shapefile should point to the directory containing the shapfiles, not the path to the cpg file. GeoPandas may be more tolerant of the path. |
Yes pointing to the cpg file was a typo. I meant to do SHP. It's frustrating that each shapefile needs to be in its own directory for this to work. I've 100s that I use regularly. I just want to point at the file, not a folder. Could this be considered for future improvements to the package @jiayuasu ? |
I cannot edit this variable. sedona.conf.set("spark.databricks.unityCatalog.volumes.enabled", "true") But it seems ok as it's correct anyway. However I still fail to read a shapefile:
IllegalArgumentException: Cannot access the UC Volume path from this location. Path was /Volumes/prod_sandbox/su_jim/volume/tests/temp |
The newly added shapefile datasource works on Unity Catalog volumes (tested on DBR 15.4 LTS). You'll be able to read shapefiles in Unity Catalog volumes using: path = "/Volumes/catalog_name/schema_name/volume_name/shapefile_directory"
df = sedona.read.format("shapefile").load(path) |
Thank you for the update @Kontinuation . I do still wish that we could point at a file instead of a folder, but this helps at least. |
It supports paths pointing to .shp files. |
Oh that's amazing !!!! Thanks so much. |
Hi @Kontinuation . Just wondering - is this feature in 1.6.1 , or will it be in 1.7.0 (which I don't think is released yet). Thanks. |
It will be in 1.7.0. You can try it out using the jars built by GitHub Actions (see Artifacts at the bottom): https://github.com/apache/sedona/actions/runs/10674801446 |
Thanks |
Running apache-sedona 1.6.0 on Databrick Runtime 14.3.
Tested the Python shapefilereader with a unity catalogue volume on Databricks and it fails.
"Cannot access the UC volume from this location"
Geopandas works fine.
Thanks.
The text was updated successfully, but these errors were encountered: