Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
Showing results for 
Search instead for 
Did you mean: 

Spatial Queries

New Contributor II


I'm trying to execute the following code:

       ST_X(ST_GeomFromWKB(Geom_Varbinary)) AS STX,
       ST_Y(ST_GeomFromWKB(Geom_Varbinary)) AS STY
FROM ordnance_survey_lsoas_december_2021_population_weighted_centroids
WHERE LSOA21CD = 'E01029645'
And get the following error:
AnalysisException:  [ST_NOT_ENABLED] st_x is disabled or unsupported. Consider enabling Photon or switch to a tier that supports ST expressions
I've enabled Photon but that doesn't resolve the issue.  Cluster is defined as below:

Policy - Shared Compute
Access mode - Shared
Databricks Runtime Version - 14.2 (includes Apache Spark 3.5.0, Scala 2.12)
Worker type - Standard_D8ads_v5
Unity Catalog Enabled
1-5 Workers - 32-160 GB Memory, 8-40 Cores
1 Driver - 32 GB Memory, 8 Cores


New Contributor III
New Contributor III

Hello @GMB , how are you?

The "st_x" function is part of the spatial expressions supported in Photon-enabled Databricks Runtime 14.2 with the Private Preview enabled.

Here are the steps you can follow:

  1. Ensure that you're using a Photon-enabled Databricks cluster. If not, you might need to switch to a Photon-enabled cluster.

  2. Check if the Private Preview is enabled in your workspace. If not, you might need to enable it.

  3. Once you have a Photon-enabled cluster and the Private Preview enabled, you should be able to use the "st_x" function.

To participate on the Private Preview, your account team will need to nominate you first, then you will need to approve the Private Preview Terms of Service. 

Can you please check with your SA or Account's Manager to see whether you can join?



New Contributor II

Are there any alternative options without enabling Private Preview?

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!