The Analytics Toolbox for Databricks is experimental and the API might be subject to changes in the future.
This guide explains all the steps to install the Analytics Toolbox in your Databricks enviroment.
The CARTO Analytics Toolbox contains two packages:
  • core: this is the public and open-source package.
  • advanced: this is a premium package. It contains the Tiler module, that allows to process and visualize very large spatial datasets stored in Databricks.
This guide explains how to install the core package. In order to access the advanced features, please contact [email protected].
To install the core package of the Analytics Toolbox in your Databricks cluster, follow the instructions below on your Databricks workspace UI:
  • Click on Compute
  • Select the cluster where you want to install the Analytics Toolbox
  • Open the Libraries tab
  • Click on Install new
  • Select Maven as Library Source
  • Click on Search Packages, select Maven Central and look for carto.analyticstoolbox; select the latest version of the one that their “Artifact Id” start as “core_” (the other one is a dependence that this one install under the hood, you do not need to install the package that their “Artefact Id” start with “hiveless”).
  • Click on Select
  • Click Install to finish the process. Dependencies of the package will be installed transitively
Once the package is installed, you need to create the SQL UDFs functions in your cluster, open a SQL console and run this script:
Running the script above will install the functions in your Databrick’s carto database. You could install the Analytics Toolbox on a database with a different name to be used only within Databricks. However, this is a requirement for the installation in case you want the CARTO platform to detect the Analytics Toolbox in your Databricks connections. Installing the Analytics Toolbox in a different database will cause an error when the CARTO UI checks the connection.

Connection parameters

The connection parameters need to be obtained from the Databricks Workspace UI:
  • Click on Compute. Select your cluster and see the Advanced options. Open the JDBC/ODBC tab to find the following parameters:
    • Server Hostname. i.e:
    • Port. i.e.: 443
    • HTTP Path. i.e.: sql/protocolv1/o/XXXXXXXXXXXXXXXX/0000-0000000-aaaaaaaaa
To get a Token, click on {{your user name}} > User Settings, at the top right in the screen:
  • Make sure you are on the Access Tokens tab and click on Generate New Token.
  • Give the token a name and set the lifetime for it.
  • Click on Generate and you will have the option to copy your token. That is the only time you will be able to see it.