Azure Synapse Notebook does't fail immediately in case of error in code

Peter Polacek 25 Reputation points
2025-01-23T18:26:28.9+00:00

Hello,

I am struggling with really weird behavior when executing a notebook within Azure Synapse. I am utilizing pyspark and sql within this notebook and noticed that the notebook doesn't fail immediately in case of a bug or let's say typo in a code. For example I create a temp view and if I then make a SELECT from that view in another cell and type wrong view name (view which doesn't exist) the cell runs anyway very long time (around 30 minutes) and then it fails on some generic error:

"org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception:"

I'd expect that it fails immediately on "object doesn't exist" or whatever.

I encountered the same behavior also when using python code which makes all the debugging and testing very hard.

Do you please know why it's like that and how to eventually avoid that ?

Thanks

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,253 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,365 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 10,410 Reputation points Microsoft External Staff
    2025-01-24T21:49:13.04+00:00

    @Peter Polacek

    Apologies for the inconvenience.

    The error message you're encountering indicates that there is an issue with accessing Azure Blob Storage (specifically, the Azure Data Lake Storage Gen2) from your Hive query. The InvalidAbfsRestOperationException suggests that there was a problem with the REST operation being performed on the Azure Blob File System. This can happen due to several reasons such as permissions issues, incorrect configurations, or even network problems.

    Please refer to the following similar thread links on Q&A platform to get some useful insights.

    https://learn.microsoft.com/en-us/answers/questions/565482/i-am-getting-error-while-running-the-spark-job-wit

    https://learn.microsoft.com/en-us/answers/questions/1605142/data-flow-run-fails-with-invalidabfsrestoperatione

    For additional information, please refer: https://azureplayer.net/2022/12/invalidabfsrestoperationexception-in-azure-synapse-notebook/

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    I hope this information helps. Please do let us know if you have any further queries.

    Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.

    Thank you.


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.