Skip to content

Commit c4962c8

Browse files
committed
chore: improve adapter compatibility old dbt releases
1 parent 5318b81 commit c4962c8

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install-dev-dbt-%:
4444
$(MAKE) install-dev; \
4545
if [ "$$version" = "1.6.0" ]; then \
4646
echo "Applying pydantic override for dbt 1.6.0"; \
47-
$(PIP) install 'pydantic>=2.0.0' --reinstall; \
47+
$(PIP) install 'pydantic>=2.0.0' 'google-cloud-bigquery==3.30.0' 'databricks-sdk==0.28.0' --reinstall; \
4848
fi; \
4949
mv pyproject.toml.backup pyproject.toml; \
5050
echo "Restored original pyproject.toml"

tests/dbt/test_config.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from sqlmesh.core.dialect import jinja_query
1414
from sqlmesh.core.model import SqlModel
1515
from sqlmesh.core.model.kind import OnDestructiveChange, OnAdditiveChange
16+
from sqlmesh.dbt.builtin import Api
1617
from sqlmesh.dbt.column import ColumnConfig
1718
from sqlmesh.dbt.common import Dependencies
1819
from sqlmesh.dbt.context import DbtContext
@@ -1092,6 +1093,24 @@ def test_sqlmesh_model_kwargs_columns_override():
10921093
assert kwargs.get("columns") == {"c": exp.DataType.build(exp.DataType.Type.UINT)}
10931094

10941095

1096+
@pytest.mark.parametrize(
1097+
"dialect",
1098+
[
1099+
"databricks",
1100+
"duckdb",
1101+
"postgres",
1102+
"redshift",
1103+
"snowflake",
1104+
"bigquery",
1105+
"trino",
1106+
"athena",
1107+
"clickhouse",
1108+
],
1109+
)
1110+
def test_api_class_loading(dialect: str):
1111+
Api(dialect)
1112+
1113+
10951114
def test_empty_vars_config(tmp_path):
10961115
"""Test that a dbt project can be loaded with an empty vars config."""
10971116
dbt_project_dir = tmp_path / "test_project"

0 commit comments

Comments
 (0)