databrickslabs / mosaic

An extension to the Apache Spark framework that allows easy and fast processing of very large geospatial datasets.
https://databrickslabs.github.io/mosaic/
Other
271 stars 66 forks source link

Automatic SQL registration doesn't work #317

Closed edobrynin-dodo closed 1 year ago

edobrynin-dodo commented 1 year ago

Describe the bug

I have mosaic 0.3.7.jar installed on my databricks cluster.

image

I also put this jar into these locations:

image image image

I put these spark configs to my cluster's "Advanced options" section:

image

However, when I'm trying to check if Mosaic functions were registered:...

spark.sql("""show functions""").where("startswith(function, 'st_')").display()

...the result is zero unfortunately.

image

Expected behavior display() call shows functions from Mosaic library titled with "st_"

Additional context

May I ask for help? Probably I do something wrong:( Thank you in advance!

edurdevic commented 1 year ago

Hi @edobrynin-dodo, I see that you are installing the mosaic library from the Cluster UI. This procedure installs the library after the cluster is already started, after the SQL registration trigger. In order to make it work, you need to install the Mosaic library via init script like described here.

Please let us know if that works.

edobrynin-dodo commented 1 year ago

Hi @edurdevic!

Got it, thank you.

I think the issue can be closed then.

May I create a PR to add this info in documentation? For example in Apache Sedona they specifically write about it:

image