Skip to content

Commit

Permalink
Enforce retry defaults to ensure sufficient retries regardless of PyS…
Browse files Browse the repository at this point in the history
…QL (#907)
  • Loading branch information
benc-db authored Jan 17, 2025
1 parent 67bf98d commit 45ec259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- Refactor global state reading ([888](https://github.com/databricks/dbt-databricks/pull/888))
- Switch to relation.render() for string interpolation ([903](https://github.com/databricks/dbt-databricks/pull/903))
- Ensure retry defaults for PySQL ([907](https://github.com/databricks/dbt-databricks/pull/907))

## dbt-databricks 1.9.1 (December 16, 2024)

Expand Down
6 changes: 4 additions & 2 deletions dbt/adapters/databricks/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ class DatabricksCredentials(Credentials):
@classmethod
def __pre_deserialize__(cls, data: dict[Any, Any]) -> dict[Any, Any]:
data = super().__pre_deserialize__(data)
if "database" not in data:
data["database"] = None
data.setdefault("database", None)
data.setdefault("connection_parameters", {})
data["connection_parameters"].setdefault("_retry_stop_after_attempts_count", 30)
data["connection_parameters"].setdefault("_retry_delay_max", 60)
return data

def __post_init__(self) -> None:
Expand Down

0 comments on commit 45ec259

Please sign in to comment.