Skip to content
Merged
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
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Release History

## 2.9.4 (Unreleased)

## 2.9.4b1 (2024-02-16)
## 2.9.4 (2024-02-20)

- Fix: Cloud fetch file download errors (#356)
- Fix: Redact the URL query parameters from the urllib3.connectionpool logs (#341)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "databricks-sql-connector"
version = "2.9.4b1"
version = "2.9.4"
description = "Databricks SQL Connector for Python"
authors = ["Databricks <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __repr__(self):
DATE = DBAPITypeObject("date")
ROWID = DBAPITypeObject()

__version__ = "2.9.4b1"
__version__ = "2.9.4"
USER_AGENT_NAME = "PyDatabricksSqlConnector"

# These two functions are pyhive legacy
Expand Down
4 changes: 2 additions & 2 deletions src/databricks/sql/cloudfetch/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

logger = logging.getLogger(__name__)

DEFAULT_CLOUD_FILE_TIMEOUT = int(os.getenv("DATABRICKS_CLOUD_FILE_TIMEOUT", 60))
DEFAULT_CLOUD_FILE_TIMEOUT = int(os.getenv("DATABRICKS_CLOUD_FILE_TIMEOUT", 180))


@dataclass
Expand Down Expand Up @@ -221,7 +221,7 @@ def http_get_with_retry(url, max_retries=5, backoff_factor=2, download_timeout=6
return response
else:
logger.error(response)
except requests.RequestException as e:
except Exception as e:
# if this is not redacted, it will print the pre-signed URL
logger.error(f"request failed with exception: {re.sub(pattern, mask, str(e))}")
finally:
Expand Down
3 changes: 3 additions & 0 deletions src/databricks/sql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def _create_next_table(self) -> Union[pyarrow.Table, None]:
# The server rarely prepares the exact number of rows requested by the client in cloud fetch.
# Subsequently, we drop the extraneous rows in the last file if more rows are retrieved than requested
if arrow_table.num_rows > downloaded_file.row_count:
logger.debug(
f"received {arrow_table.num_rows} rows, expected {downloaded_file.row_count} rows. Dropping extraneous rows."
)
self.start_row_index += downloaded_file.row_count
return arrow_table.slice(0, downloaded_file.row_count)

Expand Down