diff --git a/CHANGELOG.md b/CHANGELOG.md index 0deb3288..cdf9bad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ ### Fixes - Optimize now runs after creating / updating liquid clustering tables ([463](https://github.com/databricks/dbt-databricks/pull/463)) -- fix Pylance import errors ([471](https://github.com/databricks/dbt-databricks/pull/471)) +- Fixing an issue where the new python library install from index behavior breaks users who were already customizing their installs ([472](https://github.com/databricks/dbt-databricks/pull/472)) + +### Under the Hood + +- fix Pylance import errors (thanks @dataders) ([471](https://github.com/databricks/dbt-databricks/pull/471)) ## dbt-databricks 1.6.5 (September 26, 2023) diff --git a/dbt/adapters/databricks/python_submissions.py b/dbt/adapters/databricks/python_submissions.py index efe99640..b64e603c 100644 --- a/dbt/adapters/databricks/python_submissions.py +++ b/dbt/adapters/databricks/python_submissions.py @@ -96,14 +96,17 @@ def _submit_job(self, path: str, cluster_spec: dict) -> str: packages = self.parsed_model["config"].get("packages", []) # custom index URL or default - index_url = self.parsed_model["config"].get("index_url", "https://pypi.org/simple") + index_url = self.parsed_model["config"].get("index_url", None) # additional format of packages additional_libs = self.parsed_model["config"].get("additional_libs", []) libraries = [] for package in packages: - libraries.append({"pypi": {"package": package, "repo": index_url}}) + if index_url: + libraries.append({"pypi": {"package": package, "repo": index_url}}) + else: + libraries.append({"pypi": {"package": package}}) for lib in additional_libs: libraries.append(lib)