This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7ad6b98f58 remove deprecation drill (#39732)
7ad6b98f58 is described below

commit 7ad6b98f58b2c0a01f65231422dc45f47bd7a9ee
Author: Bowrna <mailbow...@gmail.com>
AuthorDate: Mon May 27 02:07:19 2024 +0530

    remove deprecation drill (#39732)
---
 airflow/providers/apache/drill/operators/drill.py       |  4 ----
 .../apache-airflow-providers-apache-drill/operators.rst | 17 ++++++++++-------
 tests/always/test_example_dags.py                       |  2 +-
 .../system/providers/apache/drill/example_drill_dag.py  |  4 ++--
 4 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/airflow/providers/apache/drill/operators/drill.py 
b/airflow/providers/apache/drill/operators/drill.py
index 92e73f47db..5aa0f061ba 100644
--- a/airflow/providers/apache/drill/operators/drill.py
+++ b/airflow/providers/apache/drill/operators/drill.py
@@ -37,10 +37,6 @@ class DrillOperator(SQLExecuteQueryOperator):
 
     Please use 
:class:`airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator`.
 
-    .. seealso::
-        For more information on how to use this operator, take a look at the 
guide:
-        :ref:`howto/operator:DrillOperator`
-
     :param sql: the SQL code to be executed as a single string, or
         a list of str (sql statements), or a reference to a template file.
         Template references are recognized by str ending in '.sql'
diff --git a/docs/apache-airflow-providers-apache-drill/operators.rst 
b/docs/apache-airflow-providers-apache-drill/operators.rst
index b8c7c40dbd..7b647c0a2e 100644
--- a/docs/apache-airflow-providers-apache-drill/operators.rst
+++ b/docs/apache-airflow-providers-apache-drill/operators.rst
@@ -16,19 +16,22 @@
     under the License.
 
 
-Apache Drill Operators
-======================
+Connect to Apache Drill via SQLExecuteQueryOperator
+===================================================
 
 Prerequisite
 ------------
 
-To use :class:`~airflow.providers.apache.drill.operators.drill.DrillOperator`,
-you must configure a :doc:`Drill Connection <connections/drill>`.
+Use :class:`~airflow.providers.common.sql.operators.SQLExecuteQueryOperator`,
+to execute SQL commands in  `Drill <https://drill.apache.org/>`__ query engine.
 
-.. _howto/operator:DrillOperator:
+To connect to Drill, you must configure a :doc:`Drill Connection 
<connections/drill>` and can pass that as ``conn_id`` to 
SQLExecuteQueryOperator.
 
-DrillOperator
--------------
+.. warning::
+    Previously, DrillOperator was used to perform this kind of operation. But 
at the moment DrillOperator is deprecated and will be removed in future 
versions of the provider. Please consider to switch to SQLExecuteQueryOperator 
as soon as possible.
+
+SQLExecuteQueryOperator
+-----------------------
 
 Executes one or more SQL queries on an Apache Drill server.
 The ``sql`` parameter can be templated and be an external ``.sql`` file.
diff --git a/tests/always/test_example_dags.py 
b/tests/always/test_example_dags.py
index d58f58d6f1..8801743205 100644
--- a/tests/always/test_example_dags.py
+++ b/tests/always/test_example_dags.py
@@ -60,7 +60,7 @@ IGNORE_AIRFLOW_PROVIDER_DEPRECATION_WARNING: tuple[str, ...] 
= (
     
"tests/system/providers/google/cloud/life_sciences/example_life_sciences.py",
     "tests/system/providers/google/marketing_platform/example_analytics.py",
     # Deprecated Operators/Hooks, which replaced by common.sql Operators/Hooks
-    "tests/system/providers/apache/drill/example_drill_dag.py",
+    "tests/system/providers/jdbc/example_jdbc_queries.py",
     "tests/system/providers/microsoft/mssql/example_mssql.py",
     "tests/system/providers/snowflake/example_snowflake.py",
     "tests/system/providers/trino/example_trino.py",
diff --git a/tests/system/providers/apache/drill/example_drill_dag.py 
b/tests/system/providers/apache/drill/example_drill_dag.py
index 3ca4a6111a..62f332f318 100644
--- a/tests/system/providers/apache/drill/example_drill_dag.py
+++ b/tests/system/providers/apache/drill/example_drill_dag.py
@@ -25,7 +25,7 @@ import os
 from datetime import datetime
 
 from airflow.models import DAG
-from airflow.providers.apache.drill.operators.drill import DrillOperator
+from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator
 
 ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
 DAG_ID = "example_drill_dag"
@@ -38,7 +38,7 @@ with DAG(
     tags=["example"],
 ) as dag:
     # [START howto_operator_drill]
-    sql_task = DrillOperator(
+    sql_task = SQLExecuteQueryOperator(
         task_id="json_to_parquet_table",
         sql="""
         drop table if exists dfs.tmp.employee;

Reply via email to