I had to rebuild my laptop and am trying to re-install Databricks and Databricks-sql-cli so I can use the CLI to pull info from the databricks repository.
When I try to run the command: dbsqlcli -e "select distinct tableName from databases_info.all_db_tbl_clm"
I get the error: Error during request to server: [Errno 11001] getaddrinfo failed
-----
I am able to get a valid response from the DOS command: databricks workspace ls
I have updated the credentials section of the dbsqlclirc file to populate host_name, http_path and access_token.
http_path and access_token match the ones in the .databrickscfg file.
I went into the databricks compute clusters and copied the name into host_name.
Here is the app.log extract, slightly redacted:
2023-03-21 11:41:08,099 (11320/MainThread) dbsqlcli.main ERROR - error: RequestError('Error during request to server: [Errno 11001] getaddrinfo failed', gaierror(11001, 'getaddrinfo failed'))
Traceback (most recent call last):
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 94, in __init__
self.connect(hostname, http_path, access_token, database)
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 228, in connect
self.sqlexecute = SQLExecute(hostname, http_path, access_token, database)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 27, in __init__
self.connect(database=self.database)
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 32, in connect
conn = dbsql.connect(
^^^^^^^^^^^^^^
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\__init__.py", line 50, in connect
return Connection(server_hostname, http_path, access_token, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\client.py", line 189, in __init__
self._session_handle = self.thrift_backend.open_session(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 464, in open_session
response = self.make_request(self._client.OpenSession, open_session_req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 393, in make_request
self._handle_request_error(error_info, attempt, elapsed)
File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 261, in _handle_request_error
raise network_request_error