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

Error trying to create a dbt-duckdb with S3 configuration #499

Open
jandrulus opened this issue Jan 10, 2025 · 2 comments
Open

Error trying to create a dbt-duckdb with S3 configuration #499

jandrulus opened this issue Jan 10, 2025 · 2 comments

Comments

@jandrulus
Copy link

Hi all! Thanks for this great tool!
Following the demo https://github.com/mehd-io/dbt-duckdb-tutorial (creates a dbt-duckdb to process data from a public S3 bucket) I get the following error:

  10:10:55  Running with dbt=1.8.7
  10:10:55  Encountered an error:
  'type' object is not subscriptable
  10:10:55  Traceback (most recent call last):
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/cli/requires.py", line 138, in wrapper
      result, success = func(*args, **kwargs)
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/cli/requires.py", line 101, in wrapper
      return func(*args, **kwargs)
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/cli/requires.py", line 215, in wrapper
      profile = load_profile(flags.PROJECT_DIR, flags.VARS, flags.PROFILE, flags.TARGET, threads)
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/config/runtime.py", line 71, in load_profile
      profile = Profile.render(
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/config/profile.py", line 403, in render
      return cls.from_raw_profiles(
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/config/profile.py", line 369, in from_raw_profiles
      return cls.from_raw_profile_info(
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/config/profile.py", line 325, in from_raw_profile_info
      credentials: Credentials = cls._credentials_from_profile(
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/config/profile.py", line 149, in _credentials_from_profile
      cls = load_plugin(typename)
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/adapters/factory.py", line 239, in load_plugin
      return FACTORY.load_plugin(name)
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/adapters/factory.py", line 68, in load_plugin
      mod: Any = import_module("." + name, "dbt.adapters")
    File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 848, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/adapters/duckdb/__init__.py", line 4, in <module>
      from dbt.adapters.duckdb.impl import DuckDBAdapter
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/adapters/duckdb/impl.py", line 40, in <module>
      class DuckDBAdapter(SQLAdapter):
    File "/home/jan/dbt_env/lib/python3.8/site-packages/dbt/adapters/duckdb/impl.py", line 55, in DuckDBAdapter
      _temp_schema_model_uuid: dict[str, str] = defaultdict(lambda: str(uuid4()).split("-")[-1])
  TypeError: 'type' object is not subscriptable

I´m using the same profile.yml configuration as the demo repo, with dbt core version 1.8.7 and dbt-duckdb version 1.9.1.
With dbt-duckdb versions 1.9.0 and 1.8.4 all works fine :)

@jwills
Copy link
Collaborator

jwills commented Jan 10, 2025

Ah IIRC that was a bug that slipped in b/c we shouldn't have been supporting Python 3.8 with that release but did accidentally-- are you on Python 3.8 by any chance?

@jandrulus
Copy link
Author

jandrulus commented Jan 11, 2025

Hi, yes, you right. I´m on Python3.8.
Upgrading to a higher version, Python3.9.5 and with dbt=1.9.1 & dbt-duckdb==1.9.1, finally works fine! thnks!!

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

No branches or pull requests

2 participants