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
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ install-dev-dbt-%:
fi; \
$(MAKE) install-dev; \
if [ "$$version" = "1.6.0" ]; then \
echo "Applying pydantic override for dbt 1.6.0"; \
$(PIP) install 'pydantic>=2.0.0' --reinstall; \
echo "Applying overrides for dbt 1.6.0"; \
$(PIP) install 'pydantic>=2.0.0' 'google-cloud-bigquery==3.30.0' 'databricks-sdk==0.28.0' --reinstall; \
fi; \
if [ "$$version" = "1.7.0" ]; then \
echo "Applying overrides for dbt 1.7.0"; \
$(PIP) install 'databricks-sdk==0.28.0' --reinstall; \
fi; \
mv pyproject.toml.backup pyproject.toml; \
echo "Restored original pyproject.toml"
Expand Down
18 changes: 18 additions & 0 deletions tests/dbt/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from sqlmesh.core.dialect import jinja_query
from sqlmesh.core.model import SqlModel
from sqlmesh.core.model.kind import OnDestructiveChange, OnAdditiveChange
from sqlmesh.dbt.builtin import Api
from sqlmesh.dbt.column import ColumnConfig
from sqlmesh.dbt.common import Dependencies
from sqlmesh.dbt.context import DbtContext
Expand Down Expand Up @@ -1092,6 +1093,23 @@ def test_sqlmesh_model_kwargs_columns_override():
assert kwargs.get("columns") == {"c": exp.DataType.build(exp.DataType.Type.UINT)}


@pytest.mark.parametrize(
"dialect",
[
"databricks",
"duckdb",
"postgres",
"redshift",
"snowflake",
"bigquery",
"trino",
"clickhouse",
],
)
def test_api_class_loading(dialect: str):
Api(dialect)


def test_empty_vars_config(tmp_path):
"""Test that a dbt project can be loaded with an empty vars config."""
dbt_project_dir = tmp_path / "test_project"
Expand Down
Loading