Install GeoAnalytics Engine on Azure Synapse Analytics

Azure Synapse Analytics is a limitless analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Using the steps outlined below, GeoAnalytics Engine can be leveraged within a PySpark notebook hosted in Azure Synapse Analytics.

The table below summarizes the Azure Synapse runtimes supported by each version of GeoAnalytics Engine.

GeoAnalytics EngineAzure Synapse
1.0.xRuntime for Apache Spark 3.1, Runtime for Apache Spark 3.2

To complete this install you will need:

  • An active Azure subscription
  • GeoAnalytics Engine install files

  • A GeoAnalytics Engine subscription, or a license file.

Prepare the workspace

  1. If you do not have an active Synapse workspace, create one using the Azure portal or with another method listed in Azure documentation.
  2. Launch Azure Synapse Studio from your Azure Synapse Analytics workspace.
  3. Install the geoanalyitcs.jar file and the geoanalytics.whl file as Workspace packages.

Create a Spark pool

  1. Within Synapse Studio, select New Apache Spark pool.
  2. Under the Basics tab, configure the pool resources to meet your requirements.
  3. Open the Additional Settings tab. Update the Automatic pausing settings or leave the defaults.
  4. Select a supported Apache Spark version.
  5. Copy and paste the lines below into a text file and upload it to the File Upload field under Apache Spark configuration.
    Use dark colors for code blocksCopy
    spark.plugins com.esri.geoanalytics.Plugin
    spark.serializer org.apache.spark.serializer.KryoSerializer
    spark.kryo.registrator com.esri.geoanalytics.KryoRegistrator
  6. For Allow session level packages select "Enabled".
  7. Open the Tags tab and add any relevant tags (optional).
  8. Click Review + create and then Create to create the Spark pool.
  9. Wait until you receive a notification that the Spark pool is finished being provisioned, then navigate to the Packages page for your pool. Under Workspace packages click Select from workspace packages and add the geoanalytics.jar and geoanalytics.whl packages.

Authorize GeoAnalytics Engine

  1. Create a new notebook or open an existing one. Choose “PySpark (Python)” as the primary language.

  2. In the notebook, in the Attach to menu, choose the Spark pool that you created earlier.

  3. Select Run on the cell. Synapse will start a new Spark session to run this cell if needed. If a new Spark session is needed, initially it will take about two minutes to be created.

  4. Import the geoanalytics library and authorize it using your username and password or another supported authorization method. See Licensing and Authorization for more information. For example:

    Use dark colors for code blocksCopy
    import geoanalytics
    geoanalytics.auth(username="User1", password="p@ssw0rd")
  5. 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:

    Use dark colors for code blocksCopy
    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 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.