diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e72506e..1a84cde1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Under the Hood - Collapsing to a single connection manager (since the old one no longer works) ([910](https://github.com/databricks/dbt-databricks/pull/910)) +- Use POSIX standard when creating location for the tables ([919](https://github.com/databricks/dbt-databricks/pull/919)) ## dbt-databricks 1.9.2 (Jan 21, 2024) diff --git a/dbt/adapters/databricks/impl.py b/dbt/adapters/databricks/impl.py index d106dd1c..8adef638 100644 --- a/dbt/adapters/databricks/impl.py +++ b/dbt/adapters/databricks/impl.py @@ -1,4 +1,4 @@ -import os +import posixpath import re from abc import ABC, abstractmethod from collections import defaultdict @@ -214,9 +214,9 @@ def compute_external_path( raise DbtConfigError("location_root is required for external tables.") include_full_name_in_path = config.get("include_full_name_in_path", False) if include_full_name_in_path: - path = os.path.join(location_root, database, schema, identifier) + path = posixpath.join(location_root, database, schema, identifier) else: - path = os.path.join(location_root, identifier) + path = posixpath.join(location_root, identifier) if is_incremental: path = path + "_tmp" return path