-
Notifications
You must be signed in to change notification settings - Fork 57
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
vdk-impala: Add support for lineage in vdk-impala #932
Merged
Conversation
This file contains 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
antoniivanov
reviewed
Aug 4, 2022
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_plugin.py
Outdated
Show resolved
Hide resolved
antoniivanov
reviewed
Aug 4, 2022
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_plugin.py
Outdated
Show resolved
Hide resolved
antoniivanov
reviewed
Aug 4, 2022
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/lineage_utils.py
Outdated
Show resolved
Hide resolved
antoniivanov
requested changes
Aug 4, 2022
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.
Thanks for making the change.
I made some more high level questions and suggestions which we need to clear up first. I will take a more detailed look at the code later.
ivakoleva
reviewed
Aug 4, 2022
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/lineage_utils.py
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_plugin.py
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/lineage_utils.py
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-impala/tests/functional/test_impala_lineage.py
Outdated
Show resolved
Hide resolved
ivakoleva
reviewed
Aug 4, 2022
projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/lineage_utils.py
Outdated
Show resolved
Hide resolved
VladimirPetkov1
force-pushed
the
person/petkovv/impala-lineage
branch
5 times, most recently
from
August 8, 2022 12:19
52ade5a
to
4791717
Compare
antoniivanov
approved these changes
Aug 8, 2022
Add support for calculating data lineage for jobs that execute SQL queries against impala. Lineage is calculated by examining the query plan of the executed query. The query plan is retrieved by executing RPC call to Impala coordinator after query execution. The other option was to execute additional explain statements that would practically double the amount of executed queries, which could be problematic for loaded environments. Lineage is calculated only for successfully executed queries that have actually read or written data from/to the underlying storage. Implemented functional tests that verify the behaviour with all templates and simple jobs. As I hit problems starting Impala with pytest, I have bumped the timeout waiting Impala to start to 120seconds. Wasn't able to make the change work on python 3.10. Both tests and lineage collection is disabled for python 3.10. Will try to make it work in separate PR. New feature (non-breaking change which adds functionality) Signed-off-by: Vladimir Petkov <[email protected]>
VladimirPetkov1
force-pushed
the
person/petkovv/impala-lineage
branch
from
August 8, 2022 15:44
4791717
to
7969b87
Compare
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.
Add support for calculating data lineage for jobs that execute SQL queries
against impala.
Lineage is calculated by examining the query plan of the executed query. The
query plan is accessible from the cursor that executed the query, hence no
additional load is present on the target query engine. As this is not very
official way to obtain the query plan there is a risk that this implentation
may break in future impala releases.However the only option was to execute
additional explain statements that would practically double the amount of
executed queries, which could be problematic for loaded environments. Lineage
is calculated only for successfully executed queries that have actually read
or written data from/to the underlying storage.
Implemented functional tests that verify the behaviour with all templates and
simple jobs. As I hit problems starting impala with pytest, I have manually
run the docker compose file and run the tests against that instance.
New feature (non-breaking change which adds functionality)
Signed-off-by: Vladimir Petkov [email protected]