z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

Bug: Can't run with dbt-core > 1.3.2 - errors immediately after install #37

Closed jaredx435k2d0 closed 1 year ago

jaredx435k2d0 commented 1 year ago

This repo looks awesome! Exactly what I've been looking for, and indeed makes you wonder why it isn't in dbt-core.

I'd absolutely love to use it, but after running pip-install dbt-osmosis in a fresh virtual environment with a fresh (working) clone of the repo, I get the following when I try to execute dbt-osmosis yaml refactor:

Traceback (most recent call last):
  File "/Users/[my_user_name]/dbt_osmosis__venv/bin/dbt-osmosis", line 5, in <module>
    from dbt_osmosis.main import cli
  File "/Users/jaredchristensen/dbt_osmosis__venv/lib/python3.9/site-packages/dbt_osmosis/main.py", line 15, in <module>
    from dbt_osmosis.core.diff import diff_and_print_to_console
  File "/Users/jaredchristensen/dbt_osmosis__venv/lib/python3.9/site-packages/dbt_osmosis/core/diff.py", line 10, in <module>
    from dbt_osmosis.core.osmosis import DbtProject
  File "/Users/jaredchristensen/dbt_osmosis__venv/lib/python3.9/site-packages/dbt_osmosis/core/osmosis.py", line 49, in <module>
    from dbt.contracts.graph.parsed import ColumnInfo
ModuleNotFoundError: No module named 'dbt.contracts.graph.parsed'

I first ran dbt docs generate just in case it needed the manifest or some other dbt-generated files.

Is it just that dbt-osmosis can only work with older versions of dbt?

Python 3.9.16 (also tried with Python 3.10.9 with the same versions as below)

dbt-core==1.4.1 dbt-extractor==0.4.1 dbt-osmosis==0.9.8 dbt-snowflake==1.4.0

macOS 13.1 (22C65) Snowflake 7.3.0

jaredx435k2d0 commented 1 year ago

Just updated the title as I'm realizing that this works fine with dbt-core 1.3.2 and dbt-snowflake 1.3.0

z3z1ma commented 1 year ago

Thanks for the issue! I actually have a big update planned and part of that has involved gutting the core abstractions here https://github.com/z3z1ma/dbt-core-interface so I will ensure compatibility with the updated API! Will keep this here as a placeholder.

jaredx435k2d0 commented 1 year ago

@z3z1ma , awesome to hear there is a big update planned! Would you expect it to also address #38 ?

z3z1ma commented 1 year ago

Took a first stab at a release, leveraging vendored interface that should be compatible with everything. New version is 0.10.0 on pypi. Exclusively focused on the yaml commands for now.