Skip to content

Commit

Permalink
Add dbt 1.9.x support (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek authored Dec 11, 2024
1 parent a997c9e commit bbf99ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
dbt-version: [ "1.7", "1.8" ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
dbt-version: [ "1.7", "1.8", "1.9" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 7 additions & 0 deletions opendbt/dbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ def patch_dbt():
dbt.adapters.factory.FACTORY = OpenDbtAdapterContainer()
from opendbt.dbt.v18.task.run import ModelRunner
dbt.task.run.ModelRunner = ModelRunner
elif Version("1.9.0") >= dbt_version < Version("1.10.0"):
from opendbt.dbt.v18.task.docs.generate import OpenDbtGenerateTask
dbt.task.docs.generate.GenerateTask = OpenDbtGenerateTask
from opendbt.dbt.v18.adapters.factory import OpenDbtAdapterContainer
dbt.adapters.factory.FACTORY = OpenDbtAdapterContainer()
from opendbt.dbt.v18.task.run import ModelRunner
dbt.task.run.ModelRunner = ModelRunner
else:
raise Exception(
f"Unsupported dbt version {dbt_version}, please make sure dbt version is supported/integrated by opendbt")
Expand Down

0 comments on commit bbf99ed

Please sign in to comment.