saurabh18cs
Honored Contributor III

try this with parameters once:

 

def get_remote_spark(host: str, cluster_id: str, token: str) -> SparkSession:
    from databricks.connect import DatabricksSession
    return DatabricksSession.builder.remote(host=host, cluster_id=cluster_id, token=token).getOrCreate()
 
 
OR 
 

Run the following command to configure Databricks Connect to use the .databrickscfg file inside CLI:

databricks-connect configure