Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fixed CI MinIO client installation by following download redirects.
- Suppressed Dremio Cloud folder-creation errors when a folder already exists.
- Avoided creating existing folders during schema setup.
- Fix infinite hang on cancelled Dremio jobs by handling the CANCELED job state (single L)

# dbt-dremio v1.10.0

Expand Down
11 changes: 9 additions & 2 deletions dbt/adapters/dremio/api/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _initialize(self):
def _populate_rowcount(self):
if self.closed:
raise Exception("CursorClosed")
# keep checking job status until status is one of COMPLETE, CANCELLED or FAILED
# keep checking job status until status is one of COMPLETED, CANCELED or FAILED
# map job results to AdapterResponse
job_id = self._job_id

Expand All @@ -132,7 +132,14 @@ def _populate_rowcount(self):
error_message = job_status_response["errorMessage"]
raise Exception(f"ERROR: {error_message}")

if job_status_state == "CANCELLED":
if job_status_state in ("CANCELED", "CANCELLED"):
cancellation_reason = job_status_response.get(
"cancellationReason"
)
if cancellation_reason:
raise Exception(
f"Job was cancelled: {cancellation_reason}"
)
raise Exception("Job was cancelled")

if job_status_state == "COMPLETED":
Expand Down