Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions providers/apache/drill/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ requires-python = ">=3.10"
dependencies = [
"apache-airflow>=2.10.0",
"apache-airflow-providers-common-sql>=1.26.0",
"apache-airflow-providers-common-compat>=1.8.0",
# Workaround until we get https://github.com/JohnOmernik/sqlalchemy-drill/issues/94 fixed.
"sqlalchemy-drill>=1.1.0,!=1.1.6,!=1.1.7",
]
Expand Down
2 changes: 2 additions & 0 deletions providers/apache/druid/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ requires-python = ">=3.10"
dependencies = [
"apache-airflow>=2.10.0",
"apache-airflow-providers-common-sql>=1.26.0",
"apache-airflow-providers-common-compat>=1.8.0",
"pydruid>=0.6.6",
]

Expand All @@ -75,6 +76,7 @@ dev = [
"apache-airflow-task-sdk",
"apache-airflow-devel-common",
"apache-airflow-providers-apache-hive",
"apache-airflow-providers-common-compat",
"apache-airflow-providers-common-sql",
# Additional devel dependencies (do not remove this line and add extra development dependencies)
"apache-airflow-providers-common-sql[pandas,polars]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from pydruid.db import connect

from airflow.exceptions import AirflowException
from airflow.providers.apache.druid.version_compat import BaseHook
from airflow.providers.common.compat.sdk import BaseHook
from airflow.providers.common.sql.hooks.sql import DbApiHook

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
from typing import TYPE_CHECKING, Any

from airflow.providers.apache.druid.hooks.druid import DruidHook, IngestionType
from airflow.providers.apache.druid.version_compat import BaseOperator
from airflow.providers.common.compat.sdk import BaseOperator

if TYPE_CHECKING:
from airflow.providers.apache.druid.version_compat import Context
from airflow.providers.common.compat.sdk import Context


class DruidOperator(BaseOperator):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from typing import TYPE_CHECKING, Any

from airflow.providers.apache.druid.hooks.druid import DruidHook
from airflow.providers.apache.druid.version_compat import BaseOperator
from airflow.providers.apache.hive.hooks.hive import HiveCliHook, HiveMetastoreHook
from airflow.providers.common.compat.sdk import BaseOperator

if TYPE_CHECKING:
from airflow.providers.apache.druid.version_compat import Context
from airflow.providers.common.compat.sdk import Context

LOAD_CHECK_INTERVAL = 5
DEFAULT_TARGET_PARTITION_SIZE = 5000000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,7 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
AIRFLOW_V_3_1_PLUS: bool = get_base_airflow_version_tuple() >= (3, 1, 0)

if AIRFLOW_V_3_1_PLUS:
from airflow.sdk import BaseHook
else:
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]

if AIRFLOW_V_3_0_PLUS:
from airflow.sdk import BaseOperator
from airflow.sdk.definitions.context import Context
else:
from airflow.models import BaseOperator
from airflow.utils.context import Context

__all__ = [
"AIRFLOW_V_3_0_PLUS",
"AIRFLOW_V_3_1_PLUS",
"BaseHook",
"BaseOperator",
"Context",
]