The Databricks Data Intelligence Platform provides a unified set of tools for building, deploying, sharing, and maintaining enterprise-grade data solutions at scale. Databricks integrates with cloud storage and security in your cloud account, and manages and deploys cloud infrastructure on your behalf. The Databricks Runtime releases include both open source technologies like Apache Spark, as well as a number of proprietary tools that integrate and expand these technologies to add optimized performance and ease of use.

GeoAnalytics Engine can be installed on Databricks in Azure, AWS, or Google Cloud Platform to add spatial data science and analysis capabilities to your Databricks workspace. After installing GeoAnalytics Engine, you will be able to run spatial SQL functions and analysis tools using a Spark cluster managed by Databricks. Because GeoAnalytics Engine extends PySpark, you can spatially-enable your data wherever it lives and seamlessly execute spatial analysis workflows alongside other data science and machine learning technologies in a Databricks notebook.

Databricks runtime support

The table below summarizes the Databricks Runtime releases supported by each version of GeoAnalytics Engine. Both the Databricks Runtime and Databricks Runtime for Machine Learning are supported. See Databricks runtime releases for details on runtime components.

GeoAnalytics EngineDatabricks Runtimes
1.7.x12.2-17.3
2.0.x13.3-18.1
2.1.x13.3-18.2
2.2.x14.3-19

Databricks compute policy and access mode support

GeoAnalytics Engine support depends on the compute policy, access mode, and whether your workspace is enabled for Unity Catalog. See Databricks' compute selection recommendations to choose a configuration for your workload. To confirm that Unity Catalog is enabled, follow Databricks' instructions.

The diagram below shows how compute policy and access mode determine GeoAnalytics Engine support in a Unity Catalog-enabled workspace. The partial support table summarizes supported features when full support is not available.

Standard
Dedicated
Which compute policy are you using?
Shared Compute
Unrestricted
Power User Compute
Personal Compute
Legacy Shared Compute
Serverless Compute
Which access mode are you using?
Partial support
Full support
Not supported

Partial Support table

SQL FunctionsTrack FunctionsRaster FunctionsToolsSpatial Data SourcesUtilitiesDataFrame extensions
11112
Full supportPartial supportNo support
  • 1. Scala not supported.
  • 2. File geodatabase, GeoJSON, Raster, and Shapefile are not supported

Databricks recommends migrating existing workspaces to Unity Catalog. Full compatibility with Databricks workspaces that are not enabled for Unity Catalog is not guaranteed. For the best user experience, we strongly recommend migrating to a Unity Catalog-enabled Databricks workspace when using GeoAnalytics Engine 2.2 or later.

GeoAnalytics Engine does not fully support the Photon query engine and you may experience degraded performance of GeoAnalytics Engine tools, functions, and spatial data sources when Photon is enabled. It is recommended to disable Photon if the majority of your workflows will utilize GeoAnalytics Engine functionality.

Install

By following the steps below, you can leverage GeoAnalytics Engine within a Databricks notebook. To complete the installation, you will need:

  • An active subscription to AWS, Azure, or Google Cloud Platform.
  • GeoAnalytics Engine install files. If you have a connected GeoAnalytics Engine subscription, you can download the ArcGIS GeoAnalytics Engine distribution here after signing in. If you have a license file, follow the instructions provided with your license file to download the GeoAnalytics Engine distribution.

  • A GeoAnalytics Engine subscription, or a license file.

Prepare the workspace

  1. If you do not have an active Databricks account, create one by starting a Databricks free trial.

  2. Create a Databricks workspace if you don't have one already and open the workspace in a web browser.

  3. Find the jar file downloaded previously and import it as a Databricks workspace file or upload it to Databricks' Unity Catalog volumes. Copy or make note of the jar path. Use the File API Format, for example /Workspace/Shared/engine/jars/geoanalytics_2_13_x_x_x.jar. Depending on the analysis you will complete, optionally upload the following jars:

    • esri-projection-geographic, if you need to perform a transformation that requires supplementary projection data.
    • geoanalytics-natives to use geocoding or network analysis tools.
    • geoanalytics-raster to use raster functions, tools, and data sources.
    • geoanalytics-geoenrichment to use GeoEnrichment tools.
  4. Use the script below as a Cluster-scoped init script to install GeoAnalytics Engine on only this cluster. You can alternatively use it as a Global init script to install GeoAnalytics Engine on all clusters in your Databricks workspace. Replace JAR_PATH with the File API path noted in step 3.

    Use dark colors for code blocksCopy
    1
    2
    #!/bin/bash
    cp JAR_PATH /databricks/jars/

    If you need to perform a transformation that requires supplementary projection data, add the first line in the example below to the script and replace PROJECTION_DATA_JAR_PATH with the corresponding File API path noted in step 3. Follow these steps for every esri-projection-geographic jar that you previously uploaded.

    If you are planning to use geocoding or network analysis tools, add the second line in the example below to the script and replace GEOANALYTICS_NATIVES_JAR_PATH with the corresponding File API path noted in step 3.

    If you are planning to use raster functions, tools, or data sources, add the third line in the example below to the script and replace GEOANALYTICS_RASTER_JAR_PATH with the corresponding File API path noted in step 3.

    If you are planning to use GeoEnrichment tools, add the fourth line in the example below to the script and replace GEOANALYTICS_GEOENRICHMENT_JAR_PATH with the corresponding File API path noted in step 3.

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    cp PROJECTION_DATA_JAR_PATH /databricks/jars/
    cp GEOANALYTICS_NATIVES_JAR_PATH /databricks/jars/
    cp GEOANALYTICS_RASTER_JAR_PATH /databricks/jars/
    cp GEOANALYTICS_GEOENRICHMENT_JAR_PATH /databricks/jars/
  5. If your workspace is enabled for Unity Catalog and you intend to use Standard Access Mode or Shared Compute, you must add the init script from step 4 and any jar files from step 3 to the Unity Catalog allowlist before continuing.

Create a cluster

  1. In the workspace sidebar, go to Compute, and click the Create compute button to open the New compute page.
  2. In the General section, choose a name for your cluster and select an appropriate Policy for your workflow.
  3. In the Performance section, choose a supported Databricks Runtime Version and choose whether or not to enable Photon acceleration and Machine learning. See Databricks runtime support for more details.
  4. Choose your preferred Worker Type and Driver Type options.
  5. For the other parameters in the Performance section, use the default or change them to your preference.
  6. Under Advanced section click on Access mode and select an appropriate Access mode for your workflow.
  7. Under Advanced section click on Spark and, at a minimum, paste in the configuration below.
    Use dark colors for code blocksCopy
    1
    2
    3
    spark.plugins com.esri.geoanalytics.Plugin
    spark.serializer org.apache.spark.serializer.KryoSerializer
    spark.kryo.registrator com.esri.geoanalytics.KryoRegistrator
    You may also need to set the following optional configuration properties depending on your workflows:
    • spark.geoanalytics.sql.functions.prefix—It is recommended to set a prefix for GeoAnalytics Engine SQL functions using this property when using Databricks 17.1 and above. Setting a prefix avoids conflation with built-in Databricks spatial functions that may have the same name. For example, if ESRI_ is set as the SQL function prefix, ESRI_ is prepended to each GeoAnalytics SQL function name. That is, ST_Point becomes ESRI_ST_Point.
    • geoanalytics.sql.tools.sqlPlanning—Set to false to use analysis tools when installing GeoAnalytics Engine in a Unity Catalog-enabled workspace and when you are using Shared Compute or Standard Access Mode (formerly known as Shared Access Mode). The default is true.
    • spark.databricks.delta.formatCheck.enabled—Set to false to read from feature services in Databricks.
    • spark.sql.sources.useV1SourceList—If your workspace is enabled for Unity Catalog and you are using Shared Compute or Standard Access Mode (formerly known as Shared Access Mode), V2 data source implementations are not supported. To use the V1 implementations of these data sources you must list them with this configuration property. For example feature-service,image-service,CRF. For more information see Data sources.
    • spark.sql.sources.commitProtocolClass—Set to org.apache.spark.sql.execution.datasources.SQLHadoopMapReduceCommitProtocol or another supported commit protocol class to write to shapefiles in Databricks.
  8. Under Advanced section click on Init Scripts and specify the path to the init script created previously.
  9. Select Create compute.
  10. Install the wheel (.whl) file downloaded previously by clicking on the Libraries tab of the cluster. Installing the file will make it available to import as a python library in a notebook. You can choose to either install the library for every cluster in your workspace or only on the cluster you are creating now. Install any other Python libraries you will need at this time.

(Optional) Check cluster status and view logs

  1. To make sure your cluster has been successfully created, look in the Event Log of the created cluster and check for Event Type of RUNNING, usually you will see under message it indicates Compute is running.

  2. If cluster creation failed, you will find Event Type of TERMINATING under Event Log. The message of TERMINATING event should give you more context of failure. For example, if you see Reason: Init script failure in the message, you should check the init script logs.

  3. If the failure reason isn't clear from Event Log, check the Driver Logs which will provide more information in standard output, standard error, and Log4j logs to help with debugging.

Authorize GeoAnalytics Engine

  1. Create a new notebook or open an existing one. Choose "Python" as the default language and attach the notebook to the cluster created previously.

  2. Import the geoanalytics library and authorize it using a username and password, an API key, or a license file. See Authorization for more information. For example:

    PythonPythonScala
    Use dark colors for code blocksCopy
    1
    2
    3
    
    import geoanalytics
    geoanalytics.auth(username="User1", password="p@ssw0rd")
  3. Try out the API by importing the SQL functions as an easy-to-use alias like ST and listing the first 20 functions in a notebook cell:

    PythonPythonScala
    Use dark colors for code blocksCopy
    1
    2
    3
    
    from geoanalytics.sql import functions as ST
    spark.sql("show user functions like 'ST_*'").show()

What's next?

You can now use any SQL function, track function, raster function, or analysis tool in the geoanalytics module.

See Data sources and Using DataFrames to learn more about how to access your data from your notebook. Also see Visualize results to get started with viewing your data on a map. For examples of what else is possible with GeoAnalytics Engine, check out the sample notebooks, tutorials, and blog posts.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.