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

[Bug] dbt failing without an implementation for abstract method get_catalog_for_single_relation #239

Closed
2 tasks done
tuliolima opened this issue Jun 18, 2024 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working triage

Comments

@tuliolima
Copy link

tuliolima commented Jun 18, 2024

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

We were running dbt with dbt-core==1.8.2 in a docker image with no problems, but recently it started to fail with the error:

  File "/usr/local/lib/python3.12/site-packages/dbt/adapters/factory.py", line 118, in register_adapter
    adapter: Adapter = adapter_type(config, mp_context)  # type: ignore
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class BigQueryAdapter without an implementation for abstract method 'get_catalog_for_single_relation'

Looking at the docker build logs we see that it was installing dbt_adapters-1.2.1 but now it started to install dbt_adapters-1.3.0, which was release 1 hour ago. One PR related to get_catalog_for_single_relation was merged a few hours ago, what can be related to this error.

Can someone help clarify what is happening?

requirements.txt:

dbt-core==1.8.2
dbt-bigquery==1.8.1
markupsafe==2.1.2
sqlfluff==3.0.7
sqlfluff-templater-dbt==3.0.7
elementary-data[bigquery]==0.15.1

Dockerfile:

FROM python:3.12.4

WORKDIR /code

COPY . .

RUN pip install -r requirements.txt

RUN dbt deps

Expected Behavior

It is expected to run all dbt commands with no problems.

Steps To Reproduce

Run any dbt command with this configs.

Relevant log output

22:49:13  Running with dbt=1.8.2
22:49:15  Registered adapter: bigquery=1.8.1
22:49:15  Encountered an error:
Can't instantiate abstract class BigQueryAdapter without an implementation for abstract method 'get_catalog_for_single_relation'
22:49:15  Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line 138, in wrapper
    result, success = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line 101, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line 247, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line [29](https://gitlab.com/brasil-paralelo-2019/data-projects/bp-dbt-dw/-/jobs/7131408631#L29)4, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/cli/requires.py", line 320, in wrapper
    ctx.obj["manifest"] = parse_manifest(
                          ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dbt/parser/manifest.py", line 1895, in parse_manifest
    register_adapter(runtime_config, get_mp_context())
  File "/usr/local/lib/python3.12/site-packages/dbt/adapters/factory.py", line 203, in register_adapter
    FACTORY.register_adapter(config, mp_context, adapter_registered_log_level)
  File "/usr/local/lib/python3.12/site-packages/dbt/adapters/factory.py", line 118, in register_adapter
    adapter: Adapter = adapter_type(config, mp_context)  # type: ignore
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class BigQueryAdapter without an implementation for abstract method 'get_catalog_for_single_relation'

Environment

- OS: Docker image python:3.12.4
- Python: 3.12.4
- dbt-adapters: 1.3.0

Additional Context

No response

@tuliolima tuliolima added bug Something isn't working triage labels Jun 18, 2024
@tuliolima
Copy link
Author

Hey, @aranke. Do you know if your PR will fix this issue?

@tuliolima
Copy link
Author

This issue was fixed in 1.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant