[Experiment] Build context from dbt's backing DB (using DBT credentials)#178
[Experiment] Build context from dbt's backing DB (using DBT credentials)#178JulienArzul wants to merge 3 commits intomainfrom
Conversation
|
Apparently, the DBT core library is not compatible with Python 3.14.. (see tests failing and this related issue) |
|
|
||
| [tool.uv] | ||
| override-dependencies = ["urllib3>=2.6.3", "filelock>=3.20.3", "virtualenv>=20.36.1"] | ||
| override-dependencies = ["urllib3>=2.6.3", "filelock>=3.20.3", "virtualenv>=20.36.1", "dbt-adapters~=1.22"] |
There was a problem hiding this comment.
The various dbt-adapters implementations (dbt-postgres and dbt-sqlite specifically) don't play well together... So I had to pin the dbt-adapters to a specific version => the version I pinned is higher than the one requested by postgres and sqlite but corresponds to the one used by snowflake.
I have tested both postgres and sqlite, and nothing fails at runtime for the use we're making (and hopefully nothing should be broken since the pinned version is only a couple minor version upgrade, that should in theory not have breaking changes)
| (project_path / "models").mkdir() | ||
| (project_path / "models" / "example.sql").write_text("select 1 as id\n", encoding="utf-8") | ||
| (project_path / "dbt_project.yml").write_text( | ||
| "\n".join( |
There was a problem hiding this comment.
That's weird way to create multiline string, when python has triple quotes for that?
@hsestupin I've written a script as an experiment that takes a DBT project as input and: