Skip to content

Commit

Permalink
remove the external file
Browse files Browse the repository at this point in the history
  • Loading branch information
nailo2c committed Feb 2, 2025
1 parent 19439ce commit 0e51cf7
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 63 deletions.
6 changes: 0 additions & 6 deletions providers/oracle/docs/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ An example usage of the SQLExecuteQueryOperator to connect to Oracle is as follo
:start-after: [START howto_operator_oracle]
:end-before: [END howto_operator_oracle]

Furthermore, you can use an external file to execute the SQL commands. Script folder must be at the same level as DAG.py file.

.. exampleinclude:: /../../providers/oracle/tests/system/oracle/example_oracle.py
:language: python
:start-after: [START howto_operator_oracle_external_file]
:end-before: [END howto_operator_oracle_external_file]

Reference
^^^^^^^^^
Expand Down
6 changes: 1 addition & 5 deletions providers/oracle/tests/system/oracle/example_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,11 @@
""",
)

# [START howto_operator_oracle_external_file]

drop_table_oracle_task = SQLExecuteQueryOperator(
task_id="drop_table_oracle",
sql="oracle_drop_table.sql",
sql="DROP TABLE employees",
)

# [END howto_operator_oracle_external_file]

(create_table_oracle_task >> insert_data_oracle_task >> select_data_oracle_task >> drop_table_oracle_task)

from tests_common.test_utils.watcher import watcher
Expand Down
20 changes: 0 additions & 20 deletions providers/oracle/tests/system/oracle/oracle_drop_table.sql

This file was deleted.

7 changes: 0 additions & 7 deletions providers/vertica/docs/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ An example usage of the ``SQLExecuteQueryOperator`` to connect to Vertica is as
:start-after: [START howto_operator_vertica]
:end-before: [END howto_operator_vertica]

Furthermore, you can use an external file to execute the SQL commands (e.g. DROP TABLE). The script
folder must be at the same level as the DAG.py file.

.. exampleinclude:: /../../providers/vertica/tests/system/vertica/example_vertica.py
:language: python
:start-after: [START howto_operator_vertica_external_file]
:end-before: [END howto_operator_vertica_external_file]

Reference
^^^^^^^^^
Expand Down
6 changes: 1 addition & 5 deletions providers/vertica/tests/system/vertica/example_vertica.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,11 @@
sql="SELECT * FROM employees",
)

# [START howto_operator_vertica_external_file]

drop_table_vertica_task = SQLExecuteQueryOperator(
task_id="drop_table_vertica",
sql="vertica_drop_table.sql",
sql="DROP TABLE IF EXISTS employees",
)

# [END howto_operator_vertica_external_file]

(
create_table_vertica_task
>> insert_data_vertica_task
Expand Down
20 changes: 0 additions & 20 deletions providers/vertica/tests/system/vertica/vertica_drop_table.sql

This file was deleted.

0 comments on commit 0e51cf7

Please sign in to comment.