bramhanandlingala opened a new pull request, #70678:
URL: https://github.com/apache/airflow/pull/70678

   **Summary**
   `BigQueryToMsSqlOperator` parsed its templated `source_project_dataset_table`
   field inside `__init__`, before Jinja rendering runs. Fixes this entry from
   the #70296 exemption-list burn-down.
   
   **Root cause**
   `source_project_dataset_table` is listed in `template_fields`, but `__init__`
   called `.split(".")` on it immediately to derive `dataset_id`/`table_id`.
   Template fields are only rendered after the constructor returns, so this
   ran against the raw, un-rendered string — a templated value like
   `"{{ params.project }}.{{ params.dataset }}.{{ params.table }}"` either
   fails to parse or produces garbage components.
   
   **Fix**
   - `__init__` now does a plain assignment of `source_project_dataset_table`
     and initializes `dataset_id`/`table_id` to `None`.
   - The `.split(".")` parsing moved to `execute()`, where it runs against the
     rendered value before delegating to `super().execute(context)`.
   - The existing `mssql_table` vs. `target_table_name` provision check was
     left untouched in `__init__`, since it only checks whether an argument
     was supplied, not its content.
   
   Related to #70296
   
   Gen-AI disclosure: I used a generative AI tool to help identify the root
   cause, write tests, and draft the PR description. I reviewed, tested, and
   verified all changes locally before submitting.
   
   
   - [X] Yes - Claude
   
   Generated-by: Claude following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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]

Reply via email to