Can't run Azure Fabric Notebook cells in VS Code

Mike Cornelis 20 Reputation points
2024-08-02T08:59:58.2233333+00:00

Hey,

I am trying to get Azure Fabric Notebook to work with VS Code using the Synapse Visual Studio Code Extension as described in: https://learn.microsoft.com/en-us/fabric/data-engineering/setup-vs-code-extension

I managed to install the prerequisites, my Java -version and conda --version both show that the path settings are set correctly. I installed the Synapse VS Code extension is VS Code. When launching VS Code I see the "fabric-synapse-runtime-1-1" and "fabric-synapse-runtime-1-2" are both created.

When I try to run a simple cell I get the message:

# Load Data from LH
df = spark.sql("SELECT * FROM TestLH.test")

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[1], line 2
      1 # Load Data from LH
----> 2 afas_df = spark.sql("SELECT * FROM TestLH.test")
AttributeError: 'NoneType' object has no attribute 'sql'

I have tried to install the package "pyspark" to see if it would resolve the issue, but it did not fix anything. When checking the logs of the notebook I see the following Error, besides a lot of Info messages:

10:43:57,960 root ERROR Failed to initialize Spark Lighter variables. Create session failed {'code': 'InternalError', 'subCode': 0, 'message': 'An internal error occurred.', 'timeStamp': '2024-08-02T08:43:57.1685726Z', 'httpStatusCode': 500, 'hresult': -2147467259, 'details': [{'code': 'RootActivityId', 'message': '9cf56fb4-67f6-425a-a43d-aeaad0768bca'}, {'code': 'Param1', 'message': 'Response status code does not indicate success: 430 ().'}]}

Can anyone of you perhaps give me some advice to fix my issue of not being able to run my cell? Thanks in advance!

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,093 questions
Microsoft Fabric Training
Microsoft Fabric Training
Microsoft Fabric: A Microsoft unified data platform.Training: Instruction to develop new skills.
38 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,471 Reputation points
    2024-08-03T04:35:49.5833333+00:00

    @Mike Cornelis Thanks for the question and using MS Q&A platform.

    Microsoft Fabric is currently not supported in the Q&A forums, the supported products are listed over here https://docs.microsoft.com/en-us/answers/products (more to be added later on).

    Can you please open as a new thread in MS Fabric community: https://community.fabric.microsoft.com/t5/General-Discussion/bd-p/ac_generaldiscussion User's image

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.