Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-3524] Remove usage of dbt.adapters.factory in dbt/common #9334

Closed
Tracked by #8917
MichelleArk opened this issue Jan 4, 2024 · 9 comments · Fixed by #9335
Closed
Tracked by #8917

[CT-3524] Remove usage of dbt.adapters.factory in dbt/common #9334

MichelleArk opened this issue Jan 4, 2024 · 9 comments · Fixed by #9335
Assignees

Comments

@MichelleArk
Copy link
Contributor

No description provided.

@github-actions github-actions bot changed the title Remove usage of dbt.adapters.factory in dbt/common [CT-3524] Remove usage of dbt.adapters.factory in dbt/common Jan 4, 2024
@MichelleArk MichelleArk self-assigned this Jan 4, 2024
@christopherekfeldt
Copy link

When trying out:
dbt-core v1.8.0b1
dbt-bigquery v1.8.0b1
or
dbt-core v1.8.0b2
dbt-bigquery v1.8.0b2

when i try to run a dbt command after installation in poetry I get this:
image

Have I missed something, or is it a bug?

@graciegoheen
Copy link
Contributor

Hi @christopherekfeldt can you share how you're installing dbt? Are you using pip install?

@QMalcolm
Copy link
Contributor

QMalcolm commented Apr 9, 2024

@christopherekfeldt If you could share your steps to installing dbt that'd be much appreciated. I tried to reproduce this with poetry (as it appears that is what you are using to install dependencies) but haven't been able to get it to error out

My steps for attempting to reproduce are as follows and was done in a clone of jaffle_shop

$ python -m venv venv
$ source venv/bin/activate
$ pip install poetry
...lots of install logs...

$ deactivate && source venv/bin/activate    # re-sourcing my terminal instance to recognize the fresh poetry binary
$ poetry init
...initialization logs...

$ code .     # added `dbt-bigquery = "^1.8.0b2"` to my dependencies in `pyproject.toml`
$ poetry install
...more install logs...

$ deactivate && source venv/bin/activate    # re-sourcing my terminal instance to recognize the fresh dbt binary
$ dbt parse
...runs without error...

$ pip freeze | grep dbt
dbt-adapters==1.0.0
dbt-bigquery==1.8.0b2
dbt-common==1.0.0
dbt-core==1.8.0b2
dbt-extractor==0.5.1
dbt-semantic-interfaces==0.5.1

@christopherekfeldt
Copy link

We are using poetry, so we change the versions in pyproject.toml

our setup:

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
dbt-bigquery = "v1.8.0b2"
dbt-core = "v1.8.0b2"
sqlfluff = "3.0.1"
pre-commit = "3.6.2"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

then use cli commands:

poetry lock --no-update
poetry install --no-root

then I ran:

dbt --version

which evaluates to -> ModuleNotFoundError: No module named 'dbt.adapters.factory'
Can it have anything to do with us using python 3.12?

@christopherekfeldt
Copy link

Screenshot:

image

@Arnellluke
Copy link

Arnellluke commented Apr 11, 2024

I have the same version of dbt packages
image

and receive the same error:
image

Version 1.8.0b1 works as expected

@Arnellluke
Copy link

To my above comment, I found that uninstalling all 6 of the dbt packages manually and reinstalling the core & adapter beta versions has worked.
To note, the resultant versions of adapters, common, extractor, semantic-interfaces were still the same versions in fresh & upgraded install cases.

@benedikt-buchert
Copy link

benedikt-buchert commented May 11, 2024

Was able to fix this via:

pip uninstall dbt-adapters
pip install dbt-adapters==1.1.1

@brabster
Copy link

brabster commented May 12, 2024

I also got caught out by this a couple of hours ago - pip --upgrade left me broken, clean and reinstall venv sorted it. Details https://tempered.works/posts/2024/05/12/dbt-18-breaks-on-update/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants