Vamsi-klu commented on PR #69108:
URL: https://github.com/apache/airflow/pull/69108#issuecomment-4912281568
Confirmed the fix is correct. self.schema_fields is assigned from the ctor
arg in __init__ and later read in execute() and the load/external-config
builders (self.schema_fields -> load.schema.fields and the external-table
config), so adding "schema_fields" to template_fields is the right place to
make a Jinja/XComArg value resolve before it reaches BigQuery. The json
renderer mirrors BigQueryUpdateTableSchemaOperator, which already registers
template_fields_renderers = {"schema_fields_updates": "json"}. Plain list/dict
callers are unaffected: render_template recurses but leaves non-templated
strings unchanged. The regression test renders "{{ var.value.schema_fields }}"
under render_template_as_native_obj=True and asserts operator.schema_fields ==
SCHEMA_FIELDS, so it fails if "schema_fields" is dropped from template_fields.
One thing to confirm before merge: the triage note flagged failing Static
checks and the Compat 2.11.1 provider-distribution leg on an earlier head --
the full
CI suite isn't currently showing green (only Mergeable/WIP report), so please
re-run and confirm those pass on the latest rebase.
--
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]