codeforkjeff / dbt-sqlite

A SQLite adapter plugin for dbt (data build tool)
Apache License 2.0
78 stars 13 forks source link

upgrade to support dbt-core v1.5.0 #43

Open dataders opened 1 year ago

dataders commented 1 year ago

Background

The latest version of dbt Core,dbt-core==1.5.0rc1, was published on April 13, 2023 (PyPI | Github).

How to upgrade

https://github.com/dbt-labs/dbt-core/discussions/7213 is an open discussion with more detailed information. If you have questions, please put them there!

The above linked guide has more information, but below is a high-level checklist of work that would enable a successful 1.5.0 release of your adapter.

the next minor release: 1.6.0

FYI, dbt-core==1.6.0 is expected to be released at the end of July, with a release cut at least two weeks prior.

EloiSanchez commented 1 year ago

Hi! I have recently installed dbt-sqlite using pip, as recommended, and it installs dbt-core=1.5.1 and dbt-sqlite=1.4.0, which are incompatible.

When running any dbt command it will throw an error. I manually downgraded core with pip install --upgrade dbt-core=1.4 and now it works.

I guess that until dbt-sqlite is not updated to work with dbt-core=1.5 it would be nice if the default pip installation automatically provided a compatible dbt-core version.

dataders commented 1 year ago

@EloiSanchez good callout! you've got two options, and both of them make use of something called the compatible release operator (~=)

force install dbt-core version 1.4 alongside dbt-sqlite

you already did this. as a one liner, this looks like this pip install dbt-sqlite dbt-core~=1.4.0

open a PR to change dbt-sqlite's dependency from >= to ~=

the line below should be modified to use ~=

https://github.com/codeforkjeff/dbt-sqlite/blob/af6dd91b1f5bb7043f1ae5607948e79b72616da7/setup.py#L49