cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks-Sql-Connector

Upendra_Dwivedi
New Contributor II

Hi,

i am connecting with databricks sql_warehouse using vs_code and i am running following command:

 

import os
from databricks import sql

host = 'adb-xxxxxxxxxxx.xx.azuredatabricks.net'
http_path = '/sql/1.0/warehouses/xxxxxxxxxxxxxx'
access_token = 'dapibxxxxxxxxxxxxxxxxxxxxxxxxx'
connection = sql.connect(
  server_hostname=host,
  http_path=http_path,
  access_token=access_token)

cursor = connection.cursor()
 
When i am running this command i am getting 
from databricks.sql.auth.retry import CommandType, DatabricksRetryPolicy
File "C:\Users\Upendra.Dwivedi\OneDrive - xxxxxx\Desktop\Databricks Practice\Sql_Connection_Databricks\.venv\lib\site-packages\databricks\sql\auth\retry.py", line 19, in <module>
from packaging import version
ModuleNotFoundError: No module named 'packaging'

Not able to understand the reason behind this error.
0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group