Skip to content

Commit

Permalink
Add dbt 1.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Dec 11, 2024
1 parent bbf99ed commit ac10162
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
dbt-version: [ "1.7", "1.8", "1.9" ]
dbt-version: [ "1.6", "1.7", "1.8", "1.9" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
9 changes: 8 additions & 1 deletion opendbt/dbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ def patch_dbt():
# Monkey Patching! Override dbt lib code with new one
# ================================================================================================================
dbt_version = Version(dbt.version.get_installed_version().to_version_string(skip_matcher=True))
if Version("1.7.0") <= dbt_version < Version("1.8.0"):
if Version("1.6.0") <= dbt_version < Version("1.7.0"):
from opendbt.dbt.v17.task.docs.generate import OpenDbtGenerateTask
dbt.task.generate.GenerateTask = OpenDbtGenerateTask
from opendbt.dbt.v17.adapters.factory import OpenDbtAdapterContainer
dbt.adapters.factory.FACTORY = OpenDbtAdapterContainer()
from opendbt.dbt.v17.task.run import ModelRunner
dbt.task.run.ModelRunner = ModelRunner
elif Version("1.7.0") <= dbt_version < Version("1.8.0"):
from opendbt.dbt.v17.task.docs.generate import OpenDbtGenerateTask
dbt.task.generate.GenerateTask = OpenDbtGenerateTask
from opendbt.dbt.v17.adapters.factory import OpenDbtAdapterContainer
Expand Down

0 comments on commit ac10162

Please sign in to comment.