-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
google: move bigquery openlineage imports inside methods #40062
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Great job!
af12658
to
762eb65
Compare
Would be more feasible to keep the code in the separate module as it is and move OL imports from top-level to local imports? |
762eb65
to
13ec9a6
Compare
@JDarDagran The problem I had trying this was the definition of |
How about having mixin only in, let's say, |
sounds good to me, I will make the changes in this PR |
07a3a3b
to
0718f3b
Compare
0718f3b
to
974aac7
Compare
Co-authored-by: Cloud Composer Team <no-reply@google.com>
Co-authored-by: Cloud Composer Team <no-reply@google.com>
closes: #40043
In the latest google providers version (10.19.0), importing
bigquery
operators results in importing theopenlineage
package even when the openlineage provider is not installed.This refactors the code so all imports to the
openlineage
package happen only insideget_openlineage_facets_on_*
again.#39614 moved the mixin to
openlineage/utils.py
and this brings it back tooperators/bigquery.py
to keep the top-levelopenlineage
imports inutils.py
, and even worse because the mixin is now bulkier thank before. Another option would be to moveBigQueryJobRunFacet
andBigQueryErrorRunFacet
to another file, and move allopenlineage
top-level imports inutils.py
inside methods. Open to suggestions.^ 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.