Hello! I am following the getting started guide, a...
# troubleshooting
s
Hello! I am following the getting started guide, and at step 3 (https://docs.meltano.com/getting-started/part3#run-the-transformation-process) I get the following error:
Copy code
(env) [sliberman@sergio-blade demo]$ meltano invoke dbt-postgres:run
2023-05-17T12:37:21.956349Z [info     ] Environment 'dev' is active
Traceback (most recent call last):
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/bin/dbt", line 5, in <module>
    from dbt.main import main
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/dbt/main.py", line 3, in <module>
    from dbt.logger import log_cache_events, log_manager
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/dbt/logger.py", line 17, in <module>
    from dbt.dataclass_schema import dbtClassMixin
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/dbt/dataclass_schema.py", line 37, in <module>
    class dbtClassMixin(DataClassDictMixin, JsonSchemaMixin):
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/mashumaro/mixins/dict.py", line 16, in __init_subclass__
    builder.add_from_dict()
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/mashumaro/core/meta/builder.py", line 419, in add_from_dict
    dialects_feature = self.is_code_generation_option_enabled(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/mashumaro/core/meta/builder.py", line 594, in is_code_generation_option_enabled
    type_name(ancestor)
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/mashumaro/core/meta/helpers.py", line 150, in type_name
    elif is_generic(t) and not is_type_origin:
         ^^^^^^^^^^^^^
  File "/home/sliberman/Documents/src/max/meltano/demo/.meltano/transformers/dbt-postgres/venv/lib/python3.11/site-packages/mashumaro/core/meta/helpers.py", line 217, in is_generic
    raise NotImplementedError
NotImplementedError
I also found this issue https://meltano.slack.com/archives/CMN8HELB0/p1678136897312569?thread_ts=1678134699.744109&amp;cid=CMN8HELB0 to be related to my problem. Thanks!
p
@sergio_liberman_bronfman thanks for raising this! I opened a PR to get the guides refreshed https://github.com/meltano/meltano/pull/7678. Unfortunately I dont think I'm much help in debugging your particular issue. Although recently we've seen some issues get resolved by switching to using the dbt utility plugin instead of the transformer (which we're slowly deprecating)
s
Thanks Pat. I'll check that out.
l
@sergio_liberman_bronfman I was running into the same problem while following along with the getting started docs. It seems that python 3.11 support was added to dbt-core in 1.4. Which can be seen here https://github.com/dbt-labs/dbt-core/blob/1.4.latest/CHANGELOG.md. The pip url for dbt-postgres on meltano add utility dbt-postgres points to dbt-core 1.3.0. In order to fix this, you can change it to point to 1.5 like so in meltano.yml
Copy code
utilities:
    - name: dbt-postgres
      variant: dbt-labs
      pip_url: dbt-core~=1.5.0 dbt-postgres~=1.5.0 git+<https://github.com/meltano/dbt-ext.git@main>
      config:
        host: localhost
        port: 5432
        user: meltano
        dbname: postgres
        schema: analytics
I then re initialized dbt-postgres and re ran
meltano invoke dbt-postgres:run
and it worked, hopefully this might help in case you are still experiencing this issue.