Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set job labels for traceability in BigQuery jobs #37736

Merged
merged 6 commits into from
Mar 15, 2024
Merged

Set job labels for traceability in BigQuery jobs #37736

merged 6 commits into from
Mar 15, 2024

Conversation

stiak
Copy link
Contributor

@stiak stiak commented Feb 27, 2024

This adds the airflow dag ID and task ID as labels to BigQuery jobs. This helps trace the jobs back to their corresponding DAG from audit logs and job history. I personally use this to track BigQuery costs at a DAG/task granularity over time.

Let me know if there is a better place to put this than the _submit_job call.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Feb 27, 2024
Copy link
Contributor

@dirrao dirrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eladkal eladkal changed the title Set job labels for traceability Set job labels for traceability in BigQuery jobs Mar 14, 2024
@stiak
Copy link
Contributor Author

stiak commented Mar 15, 2024

Looks like there was maybe a timeout in one of the build steps. Is there anything I need to do?

@potiuk potiuk merged commit 3e2bfb8 into apache:main Mar 15, 2024
54 checks passed
@stiak stiak deleted the add-bigquery-job-labels branch March 18, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants