dbt-duckdb icon indicating copy to clipboard operation
dbt-duckdb copied to clipboard

Error trying to create a dbt-duckdb with S3 configuration

Open jandrulus opened this issue 9 months ago • 2 comments

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 :)

jandrulus avatar Jan 10 '25 10:01 jandrulus