cancel
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.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Spatial Queries

GMB
New Contributor II

Hi,

I'm trying to execute the following code:

%sql
SELECT LSOA21CD,
       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
Extra
1-5 Workers - 32-160 GB Memory, 8-40 Cores
1 Driver - 32 GB Memory, 8 Cores

2 REPLIES 2

anardinelli
Databricks Employee
Databricks Employee

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?

Best,

Alessandro

GMB
New Contributor II

Are there any alternative options without enabling Private Preview?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group