Select to view content in your preferred language

Problem with getting started with GeoAnalytics in Fabric

205
2
Jump to solution
03-17-2025 01:44 PM
Trippetoe
Frequent Contributor

Hello. At the Dev Summit i had a great conversation with someone (Noah maybe) at the GeoAnalytics booth about getting AGOL data into Fabric. He pointed me towards the 'GeoAnalytics in Fabric' blog.

This first morning after the Dev Summit i was excited to get started testing some of the functionality. I had our Fabric Admin enable the required tenet setting, and fired up my first notebook. I copy/pasted the first bit of example code, and ran into an error.

import geoanalytics_fabric from geoanalytics_fabric.sql
import functions as ST
spark.sql("show user functions like 'ST_*'").show()

There was a much longer exception message, but this part seems to be the summary, maybe

AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Spark SQL queries are only possible in the context of a lakehouse. Please attach a lakehouse to proceed.)

The next section of code (creating a data frame and echoing out the schema) worked fine.

I'm gonna keep on plugging thru the tutorials, but is there something i need to do, like creating a lakehouse, before i can run that first bit of code (and maybe other sections as well)?

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Trippetoe
Frequent Contributor

I figured it out. I needed to open / create my notebook after opening a Lake House in my workspace so that the notebook was in the 'context' (i guess) of a lake house. When i got the error, i had started by creating a new notebook as a sort of 'stand alone'. All is working as expected now.

View solution in original post

2 Replies
Trippetoe
Frequent Contributor

I figured it out. I needed to open / create my notebook after opening a Lake House in my workspace so that the notebook was in the 'context' (i guess) of a lake house. When i got the error, i had started by creating a new notebook as a sort of 'stand alone'. All is working as expected now.

SBattersby
Esri Contributor

I'm glad you figured this out!  I just ran into this the other day as well and I need to update the blog to note this... apparently to run a SQL statement - even if it doesn't reference anything in a Lakehouse - you need to have a Lakehouse attached to the notebook.  This doesn't seem to impact anything when working with the python syntax, but it's good to know when you're just testing things out and throw in some SQL (like listing functions) 😀 

 

Thank you for reaching out on the community!

 

-Sarah.