Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'DatabricksSQLConnectionWrapper' object has no attribute 'cancel' #184

Closed
xg1990 opened this issue Sep 21, 2022 · 3 comments
Closed

'DatabricksSQLConnectionWrapper' object has no attribute 'cancel' #184

xg1990 opened this issue Sep 21, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@xg1990
Copy link

xg1990 commented Sep 21, 2022

Describe the bug

when running dbt build, got the following error msg

06:26:51  Encountered an error:
'DatabricksSQLConnectionWrapper' object has no attribute 'cancel'
06:26:51  Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 379, in execute_nodes
    self.run_queue(pool)
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 293, in run_queue
    self._raise_set_error()
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 274, in _raise_set_error
    raise self._raise_next_tick
dbt.exceptions.FailFastException: FailFast Error in model ******(models/******.sql)
  Failing early due to test failure or runtime error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dbt/main.py", line 129, in main
    results, succeeded = handle_and_check(args)
  File "/usr/local/lib/python3.9/site-packages/dbt/main.py", line 191, in handle_and_check
    task, res = run_from_args(parsed)
  File "/usr/local/lib/python3.9/site-packages/dbt/main.py", line 238, in run_from_args
    results = task.run()
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 470, in run
    result = self.execute_with_hooks(selected_uids)
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 433, in execute_with_hooks
    res = self.execute_nodes()
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 382, in execute_nodes
    self._cancel_connections(pool)
  File "/usr/local/lib/python3.9/site-packages/dbt/task/runnable.py", line 357, in _cancel_connections
    for conn_name in adapter.cancel_open_connections():
  File "/usr/local/lib/python3.9/site-packages/dbt/adapters/base/impl.py", line 1032, in cancel_open_connections
    return self.connections.cancel_open()
  File "/usr/local/lib/python3.9/site-packages/dbt/adapters/sql/connections.py", line 43, in cancel_open
    self.cancel(connection)
  File "/usr/local/lib/python3.9/site-packages/dbt/adapters/spark/connections.py", line 296, in cancel
    connection.handle.cancel()
AttributeError: 'DatabricksSQLConnectionWrapper' object has no attribute 'cancel'

Steps To Reproduce

using the following version:

dbt-databricks==1.2.2
dbt-core==1.2.1

Expected behavior

No error is expected.

Screenshots and log output

as provided above

System information

dbt-databricks==1.2.2
dbt-core==1.2.1

The output of python --version:

Additional context

Might be related to this PR: https://github.com/databricks/dbt-databricks/pull/163/files

@xg1990 xg1990 added the bug Something isn't working label Sep 21, 2022
@ueshin
Copy link
Collaborator

ueshin commented Sep 21, 2022

Hi @xg1990, thanks for the report!

It's a known bug and already fixed at #173. We will publish the next maintenance release any time soon.
We have published the RCs of the releases: 1.2.3rc0 and 1.1.5rc0. Please try with them in the meantime.

Thanks.

@xg1990
Copy link
Author

xg1990 commented Sep 21, 2022

Thank you! Really appreciate your help!

@ueshin
Copy link
Collaborator

ueshin commented Sep 26, 2022

Closing as we published 1.2.3 and 1.1.5 that include the fix.

@ueshin ueshin closed this as completed Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants