Skip to content

Commit 415eb81

Browse files
authored
fix: Override BaseHook init to support Airflow v1
Aiflow v1's BaseHook has the following __init__ signature: def __init__(self, source) This source argument is not used by us (or anywhere else in BaseHook), so we override it to not require it.
1 parent 3b65cca commit 415eb81

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

airflow_dbt_python/hooks/dbt.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ class DbtHook(BaseHook):
384384
Allows for running dbt tasks and provides required configurations for each task.
385385
"""
386386

387+
def __init__(self):
388+
pass
389+
387390
def get_config_factory(self, command: str) -> ConfigFactory:
388391
"""Get a ConfigFactory given a dbt command string."""
389392
return ConfigFactory.from_str(command)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "airflow-dbt-python"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
description = "A dbt operator for Airflow that uses the dbt Python package"
55
authors = ["Tomás Farías Santana <tomas@tomasfarias.dev>"]
66
license = "MIT"

0 commit comments

Comments
 (0)