pavansai1997 commented on code in PR #76230:
URL: https://github.com/apache/airflow/pull/76230#discussion_r4438891586
##########
providers/common/ai/src/airflow/providers/common/ai/operators/llm_sql.py:
##########
@@ -124,6 +135,7 @@ def __init__(
schema_context: str | None = None,
validate_sql: bool = True,
allowed_sql_types: tuple[type[exp.Expr], ...] = DEFAULT_ALLOWED_TYPES,
+ allowed_tables: list[str] | None = None,
Review Comment:
Static is intended. Since it is a safety control, I would rather it be fixed
when the Dag is parsed: the empty-list and `validate_sql=False` checks can fail
at construction, and the list stays out of reach of run-time values such as
`params` or `dag_run.conf`, which whoever triggers the run can set. A Dag can
still keep both in step by building them from the same Python list. I noted
this in the docstring and docs, but happy to make it a template field if you
would prefer parity with `table_names`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]