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:ย 

When Trying to use Databricks Connect to Free Edition I am getting "Failed to Read Databricks table:

ShawnRR
New Contributor II

When Trying to use Databricks Connect to Free Edition I am getting "Failed to Read Databricks table: PERMISSION_DENIED:  PERMISSION_DENIED: Cannot access Spark Connect. (requietsId=.....

So I have not done anything to my instance aside from getting a token.  Is it possible to use Databricks Connect to access my table?  If so what else do I need to do?

2 REPLIES 2

ShawnRR
New Contributor II

If it helps my AI says the following.... Note that I am the only user of this free account.  I have not done anything explicit with permissions.  I created the table I am trying to access and put data in it through the UI.  I can see when I look at the workspace in the gui the following...  Am I allowed to use database connect 18.0.0

 

 
 
 
 
 
_workspace_users_workspace_747##########771 <=== took out numbers
USE CATALOG
workspace

 
 



he project is now reaching Databricks Connect correctly, but the current blocker is workspace permissions, not code or versioning.

Current state:

dependency aligned to Databricks Connect 18.0.0
cluster ID accepted
connection reaches Spark Connect endpoint
failure is now:
PERMISSION_DENIED: Cannot access Spark Connect
Meaning:

your token/user can authenticate
but this workspace/user is not allowed to use Spark Connect on that compute
What must be fixed in Databricks:

ensure the cluster supports Databricks Connect / Spark Connect
ensure your user has permission to attach/use that cluster
ensure Spark Connect is enabled/allowed for the workspace and compute policy

emma_s
Databricks Employee
Databricks Employee

Hi, I think this is the way you're configuring Databricks Connect. This error often happens when you're trying to configure Databricks Connect for a classic cluster rather than serverless. If you do the following, it should fix the issue. 

1. Update your ~/.databrickscfg โ€” remove any cluster_id and add serverless_compute_id = auto:

 

 [DEFAULT]                                                                                                                                   
  host                  = https://<your-workspace>.cloud.databricks.com
  auth_type             = databricks-cli                                                                                                      
  serverless_compute_id = auto
                                                                             

Authenticate with:

databricks auth login --host https://<your-workspace>.cloud.databricks.com

2 In your Python code, build your session don't try and pass a cluster id. 

  from databricks.connect import DatabricksSession                                                                                            
                  
  spark = DatabricksSession.builder.getOrCreate()                                                                                             
  df = spark.read.table("workspace.default.<your_table>")
  df.show(5)    

 

I  hope this helps.


Thanks,

Emma