...fix: update template fields - #70679
Open
osintalex wants to merge 1 commit into
Open
Conversation
Allow callers to template both gcs, bq inputs and outputs for batch jobs
osintalex
force-pushed
the
add-template-fields-vertex-batch-operator
branch
from
July 29, 2026 11:52
e6d2c3d to
6b06797
Compare
shahar1
requested changes
Jul 29, 2026
Contributor
There was a problem hiding this comment.
- Could you please fix the PR title? (it should very specific to what you patch in this PR, without conventional commits prefixes like
fix:) - To get this approved and merged we'll need stronger justifications than just "it looks normal" - did you, or anyone else, actually need it on real-production cases? Do we need it for all currently suggested fields, or only few would be sufficient?
Template fields, at least in their current design, might incur a technical debt if misused in the operator - so we should be very picky regarding new additions.
I raised up #70296 after improving the pre-commit that checks for more forms of misuse, and there were about 60 justified cases where it applied. It might not be the case here (I'll let the CI/CD run to judge that), but I want to ensure that they have indeed a valid case, because we cannot easily break it afterwards.
I would like to note that if you have a valid case and you need this feature, you could always subclass and override the existing operator.
| "gcs_source", | ||
| "bigquery_source", | ||
| "gcs_destination_prefix", | ||
| "gcs_destination_prefix", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow callers to template both gcs, bq inputs and outputs for batch jobs. I am adding this in after swapping from using the vertex batch ai job operator to writing my own custom operator due to the inability to template destinations and outputs to both gcs and bq.
This seems like normal airflow behaviour to me to allow templating for different inputs/outputs, i.e. in dev environment you would inject a dev bigquery project from the config and then template that to build
<dev-project>.<dataset>whereas in prod you would have<prod-project>.<dataset>. Lacking the ability to do this in my experience pretty much breaks this operator for multi-stage work environments where you want the same code to run across dev/staging/prod.Was generative AI tooling used to co-author this PR?
No
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.