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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# under the License.
from __future__ import annotations

from collections.abc import Sequence
from typing import TYPE_CHECKING, Literal

from airflow.providers.teradata.utils.bteq_util import (
Expand Down Expand Up @@ -75,7 +76,7 @@ class BteqOperator(BaseOperator):
:param timeout_rc: Return code to use if the BTEQ execution fails due to a timeout. To allow DAG execution to continue after a timeout, include this value in `bteq_quit_rc`. If not specified, a timeout will raise an exception and stop the DAG.
"""

template_fields = "sql"
template_fields: Sequence[str] = ("sql",)
ui_color = "#ff976d"

def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def test_on_kill_not_initialized(self):

def test_template_fields(self):
# Verify template fields are defined correctly
print(BteqOperator.template_fields)
assert BteqOperator.template_fields == "sql"
assert BteqOperator.template_fields == ("sql",)

def test_execute_raises_if_no_sql_or_file(self):
op = BteqOperator(task_id="fail_case", teradata_conn_id="td_conn")
Expand Down