-
Notifications
You must be signed in to change notification settings - Fork 16.4k
google: move bigquery openlineage imports inside methods #40062
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
Conversation
VladaZakharova
left a comment
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
bigqueryoperators results in importing theopenlineagepackage even when the openlineage provider is not installed.This refactors the code so all imports to the
openlineagepackage happen only insideget_openlineage_facets_on_*again.#39614 moved the mixin to
openlineage/utils.pyand this brings it back tooperators/bigquery.pyto keep the top-levelopenlineageimports inutils.py, and even worse because the mixin is now bulkier thank before. Another option would be to moveBigQueryJobRunFacetandBigQueryErrorRunFacetto another file, and move allopenlineagetop-level imports inutils.pyinside 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.rstor{issue_number}.significant.rst, in newsfragments.