-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added Threshold Query Builder #188
Merged
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e544108
Added Threshold Query Builder feature
ravit-db 8f1af10
Refactored the code to reduce redundancy
ravit-db 44329b7
Added inline comments and renamed a function
ravit-db f8bf844
Added a test case for threshold query builder
ravit-db 9011f5e
Fixed the format issue
ravit-db 1c3f87c
Added test case for snowflake source and exception scenario
ravit-db f7d41bc
Fixed the format
ravit-db 822e506
Added the schema and catalog information to query
ravit-db ea30630
Refactored the QueryBuilder to Abstract class and added query_config …
ravit-db c184458
Fixed the review feedbacks
ravit-db 367bf75
Renamed the function parameters
ravit-db 39dd558
Fixed the review comments
ravit-db 8d13c01
Fixed the pylint error
ravit-db 4605f55
Fixed the pylint error
ravit-db b02970d
Refactored the class
ravit-db File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
11 changes: 8 additions & 3 deletions
11
src/databricks/labs/remorph/reconcile/connectors/databricks.py
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
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
11 changes: 8 additions & 3 deletions
11
src/databricks/labs/remorph/reconcile/connectors/snowflake.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
from pyspark.sql import DataFrame | ||
|
||
from databricks.labs.remorph.reconcile.connectors.data_source import DataSource | ||
from databricks.labs.remorph.reconcile.recon_config import Schema, Tables | ||
from databricks.labs.remorph.reconcile.recon_config import JdbcReaderOptions, Schema | ||
|
||
|
||
class SnowflakeDataSource(DataSource): | ||
def read_data(self, schema_name: str, catalog_name: str, query: str, table_conf: Tables) -> DataFrame: | ||
def read_data(self, catalog: str, schema: str, query: str, jdbc_reader_options: JdbcReaderOptions) -> DataFrame: | ||
# Implement Snowflake-specific logic here | ||
return NotImplemented | ||
|
||
def get_schema(self, table_name: str, schema_name: str, catalog_name: str) -> list[Schema]: | ||
def get_schema( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does |
||
self, | ||
catalog: str, | ||
schema: str, | ||
table: str, | ||
) -> list[Schema]: | ||
# Implement Snowflake-specific logic here | ||
return NotImplemented | ||
|
||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
nit: can you still rename all arguments to make them reasonably shorter? :)
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.
updated the arguments to shorter.