Setup Permissions for Wherobots through Databricks¶
To link to your Databricks account, you need an existing Databricks account. If you don’t have a Databricks account, you can sign up at https://www.databricks.com/try-databricks.
Generate a Databricks Access Token¶
- Log in to your Databricks account.
- Please create a Databricks workspace if you don't have one.
- Log in to your Databricks workspace. The URL of this workspace is
dbc-XXX-XXX.cloud.databricks.com. Then your workspace ID is
dbc-XXX-XXX. You will need it in the next steps.
- Navigate to your Databricks dashboard
Click on your User profile
Click on “User Settings”
Click on “Access tokens”
Press the button labelled “Generate new token”
Set the lifetime of the token to something appropriate to your security requirements, or set it to nothing to have it never expire. Add an appropriate comment.
Copy the Token and save it somewhere. You will need it for the next steps.
Link your Databricks account to your Wherobots Account¶
- Navigate to the Wherobots Databricks cloud provider page
- Enter your workspace ID and Access token from Databricks into the corresponding fields
- Press “Save Changes”
Create the Databricks Cluster¶
Wherobots currently does not support Databricks 13.0+ (Spark 3.4+) and Job Compute clusters. Please choose All Purpose clusters.
- Log in to your Databricks workspace.
Data Science & Engineeringmenu, choose
- Click the
Create computebutton. You can use the default setting if you just want a quick start.
Setup your Databricks Cluster with Wherobots¶
This will wipe out the existing Apache Sedona / Wherobots jars on DBFS, and overwrite existing Sedona / Wherobots settings of the cluster with the selected Wherobots version.
Navigate to the Third Party Connect page on https://wherobots.services.
Enter your credentials and click on 'Load Clusters'. Click 'Install Sedona' for the cluster you want to set up Sedona in.
Select your preferred Wherobots Version and press “Install”.
Wait for the installation to finish, the progress can be tracked through a notification on the bell icon.
Once the installation has succeeded, you can use the cluster on databricks after it has started.
Import a Notebook and run spatial queries on Databricks¶
Navigate to your Databricks workspace and press the kebab icon (three vertical dots) and press “Import” to import your notebook.
Select your notebook file. You can get one from Wherobots examples.
Press “Import” to complete the import of your notebook.
Now your notebook is imported. You can open it, select your cluster in the top right, and run spatial queries using Wherobots!