This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Working POC for filtering not existing tables from SLI view. #34
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
TODO: - unit tests - refactor to do it the same for SLI 4,5 and 7 days without copy paste - define format in which result will be streamed into BQ
Pull Request Test Coverage Report for Build 499
💛 - Coveralls |
marcin-kolda
suggested changes
Aug 21, 2018
self.bigQuery = BigQuery() | ||
|
||
def query(self, x_days): | ||
query_results = self.bigQuery.execute_query("""SELECT * FROM [project-bbq:SLO_views_legacy.SLI_3_days]""") |
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.
Please retrieve this id from configuration
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.
done
filtered_results = [table for table in query_results if self.table_exists(table)] | ||
return filtered_results | ||
|
||
def table_exists(self, result): |
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.
This method should accept table reference
…istinct tasks. Refactor and preparing output for streaming.
przemyslaw-jasinski
previously approved these changes
Aug 27, 2018
przemyslaw-jasinski
previously approved these changes
Aug 31, 2018
def __exists(self, table): | ||
return self.filter.exists(self.__create_table_reference(table)) | ||
|
||
def __create_table_reference(self, table): |
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.
IntelliJ says it may be static :)
przemyslaw-jasinski
approved these changes
Aug 31, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
YACHT-964: Working POC for filtering not existing tables from SLI view.
TODO: