Skip to content

Commit

Permalink
Move all "old" SQL operators to common.sql providers
Browse files Browse the repository at this point in the history
Previously, in apache#24836 we moved Hooks and added some new operators to the
common.sql package. Now we are salso moving the operators
and sensors to common.sql.
  • Loading branch information
potiuk committed Jul 27, 2022
1 parent 5d4abbd commit d7b1860
Show file tree
Hide file tree
Showing 22 changed files with 613 additions and 565 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ repos:
name: Update cross-dependencies for providers packages
entry: ./scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py
language: python
files: ^airflow/providers/.*\.py$|^tests/providers/.*\.py$|^tests/system/providers/.*\.py$|$airflow/providers/.*/provider.yaml$
files: ^airflow/providers/.*\.py$|^tests/providers/.*\.py$|^tests/system/providers/.*\.py$|^airflow/providers/.*/provider.yaml$
pass_filenames: false
additional_dependencies: ['setuptools', 'rich>=12.4.4', 'pyyaml']
- id: update-extras
Expand Down
2 changes: 1 addition & 1 deletion airflow/operators/check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import warnings

from airflow.operators.sql import (
from airflow.providers.common.sql.operators.sql import (
SQLCheckOperator,
SQLIntervalCheckOperator,
SQLThresholdCheckOperator,
Expand Down
6 changes: 5 additions & 1 deletion airflow/operators/presto_check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@

import warnings

from airflow.operators.sql import SQLCheckOperator, SQLIntervalCheckOperator, SQLValueCheckOperator
from airflow.providers.common.sql.operators.sql import (
SQLCheckOperator,
SQLIntervalCheckOperator,
SQLValueCheckOperator,
)

warnings.warn(
"This module is deprecated. Please use `airflow.operators.sql`.", DeprecationWarning, stacklevel=2
Expand Down
Loading

0 comments on commit d7b1860

Please sign in to comment.