Aaryan123456679 opened a new pull request, #70793: URL: https://github.com/apache/airflow/pull/70793
When `sql_alchemy_schema` is set, `reflect_tables()` derived the schema to reflect a mapped class's table by splitting its bare `__tablename__` on a dot, which discards the schema entirely for classes like `LogTemplate` whose table name has no dot. `synchronize_log_template()` then looked up the reflected table by that same bare name, which also does not match how SQLAlchemy keys schema-qualified tables in the reflected metadata. Together these left the `log_template` table unrecognized under a custom schema, causing triggering a Dag to fail with a `TypeError`. This derives the schema from the mapped class's own configured table instead of parsing its name, and looks the reflected table up by its schema-qualified key. closes: #47300 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Sonnet 5) Generated-by: Claude Code (Sonnet 5) 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]
