forked from Altinity/clickhouse-mysql-data-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/update delete with inserts #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
06a19d0
Added support to insert/update and CSV
alexon1234 b5c568f
Fix missing config
alexon1234 f149b5f
Added shutdown gracefully
alexon1234 9ee1ddf
Moved signal handler to main
alexon1234 60e732e
Fix issue with MySQL graceful exit
alexon1234 522ef1e
Add retry in case of 429
alexon1234 28d442e
Graceful exit only stops reader
alexon1234 2ab8dd9
cast retry-after to int
alexon1234 684fc77
Improve retry in TB CSV
alexon1234 f0b47b0
If received SIGINT break the loop
alexon1234 0c1a4b9
Improve logging when reading binlog pos
alexon1234 6e8c047
Validate that binlog file exist before reading it
alexon1234 03afe7c
remove local and test script
alexon1234 34c53c0
Added try/catch in upload to retry in case of error
alexon1234 be4ee99
Changed CSV writer to use QUOTE_ALL
alexon1234 72a10e3
Undo last change and add QUOTE_ALL to DictWriter
alexon1234 3389ec8
Avoiding flushing with every round
alexon1234 410adb3
Disabled Verify to avoid SSL checking
alexon1234 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
ignore = | ||
; except | ||
E722, | ||
; inline regex | ||
W605, | ||
; long lines | ||
E501, | ||
; too complex | ||
C901 | ||
max-complexity = 10 | ||
max-line-length = 120 | ||
application-import-names = flake8 |
This file contains hidden or 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 |
---|---|---|
|
@@ -46,4 +46,5 @@ _build | |
|
||
# Tinibird | ||
bl-* | ||
out-* | ||
out-* | ||
.e |
This file contains hidden or 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 | ||||
---|---|---|---|---|---|---|
|
@@ -93,6 +93,10 @@ class CLIOptions(Options): | |||||
# | ||||||
# general app section | ||||||
# | ||||||
|
||||||
'tb_host': 'https://ui.tinybird.co', | ||||||
'tb_token': None, | ||||||
|
||||||
'config_file': '/etc/clickhouse-mysql/clickhouse-mysql.conf', | ||||||
'log_file': None, | ||||||
'log_level': None, | ||||||
|
@@ -171,6 +175,20 @@ def options(self): | |||||
# | ||||||
# general app section | ||||||
# | ||||||
argparser.add_argument( | ||||||
'--tb-host', | ||||||
type=str, | ||||||
default=self.default_options['tb_host'], | ||||||
help='Tinybird host' | ||||||
) | ||||||
|
||||||
argparser.add_argument( | ||||||
'--tb-token', | ||||||
type=str, | ||||||
default=self.default_options['tb_token'], | ||||||
help='Tinybird host' | ||||||
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.
Suggested change
|
||||||
) | ||||||
|
||||||
argparser.add_argument( | ||||||
'--config-file', | ||||||
type=str, | ||||||
|
@@ -508,6 +526,11 @@ def options(self): | |||||
# | ||||||
# general app section | ||||||
# | ||||||
|
||||||
'tb_host': args.tb_host, | ||||||
'tb_token': args.tb_token, | ||||||
|
||||||
|
||||||
'config_file': args.config_file, | ||||||
'log_file': args.log_file, | ||||||
'log_level': args.log_level, | ||||||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -33,3 +33,6 @@ def __init__(self, converter=None, callbacks={}): | |
|
||
def read(self): | ||
pass | ||
|
||
def close(self): | ||
pass |
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.
😒