cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
cancel
Showing results for 
Search instead for 
Did you mean: 

Unhandled error while executing ['DatabricksSQLCursorWrapper' object has no attribute 'fetchmany'

colinsorensen
New Contributor III

Getting this error in dbt when trying to run a query. Not happening in the actual SQL warehouse in Databricks. Is this a bug? Can only find source code when I search 'DatabricksSQLCursorWrapper' but no documentation or information otherwise.

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @colinsorensenBased on the given information, it appears that the error you are encountering is related to accessing cloud storage in Databricks. The error message suggests that the cluster does not have the necessary permissions to access the storage. 

To troubleshoot this issue, you can follow these steps:

1. Check the driver log for complete error details. The error message may provide more specific information about the cause of the issue.

2. If the error includes a traceId, you can search for it in Kibana if you have ELK access. This can help you find additional error details related to the issue.

3. Collect the storage account details and storage credentials associated with the cluster. Ensure that the cluster's storage principal or managed identity has the necessary permissions to access the storage account. Specifically, it should have the STORAGE BLOB DATA CONTRIBUTOR role assigned at the storage account level.

4. Verify that no storage firewall issues could prevent the cluster from accessing the storage.

5. Double-check the storage credentials or Spark Azure keys the cluster uses.

Ensure that they are correct and valid. It's important to note that this error is not necessarily a bug in Databricks itself but rather an issue with the configuration or permissions related to accessing cloud storage.

View solution in original post

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @colinsorensenBased on the given information, it appears that the error you are encountering is related to accessing cloud storage in Databricks. The error message suggests that the cluster does not have the necessary permissions to access the storage. 

To troubleshoot this issue, you can follow these steps:

1. Check the driver log for complete error details. The error message may provide more specific information about the cause of the issue.

2. If the error includes a traceId, you can search for it in Kibana if you have ELK access. This can help you find additional error details related to the issue.

3. Collect the storage account details and storage credentials associated with the cluster. Ensure that the cluster's storage principal or managed identity has the necessary permissions to access the storage account. Specifically, it should have the STORAGE BLOB DATA CONTRIBUTOR role assigned at the storage account level.

4. Verify that no storage firewall issues could prevent the cluster from accessing the storage.

5. Double-check the storage credentials or Spark Azure keys the cluster uses.

Ensure that they are correct and valid. It's important to note that this error is not necessarily a bug in Databricks itself but rather an issue with the configuration or permissions related to accessing cloud storage.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.