-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5921] Add bulk_load_custom to MySqlHook #6575
[AIRFLOW-5921] Add bulk_load_custom to MySqlHook #6575
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6575 +/- ##
==========================================
- Coverage 83.83% 83.51% -0.33%
==========================================
Files 651 651
Lines 37431 37437 +6
==========================================
- Hits 31379 31264 -115
- Misses 6052 6173 +121
Continue to review full report at Codecov.
|
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
@feluelle to my understanding bulk load is default to not be supported since MySQL 8 due to security reasons : We also have jira about it https://issues.apache.org/jira/browse/AIRFLOW-4051 |
That's true it is not enabled by default. But you can enable this by setting |
Yes, exactly what you wrote in your jira ticket. |
@feluelle do you think it should be mentioned in the notes of the function? |
I think I wouldn't do it because this can change again and again. It is really special to the mysql client library used. That's why the library is responsible for a good error message and I think it actually logs something useful :) |
But I am not 100 percent sure. If you guys agree I can add something like:
WDYT? |
You are correct. if not it will raise error:
I think this PR also solves https://issues.apache.org/jira/browse/AIRFLOW-4051 but not https://issues.apache.org/jira/browse/AIRFLOW-4050 |
This PR does not solve 4051 - it is already solved isn't it? |
7a91fbf
to
1805099
Compare
@OmerJog PTAL |
|
||
def test_bulk_load_custom(self): | ||
self.db_hook.bulk_load_custom( | ||
'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.
'table', | |
table='table', |
What do you think about setting the params explicitly? Makes it more clear I think.
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
(cherry picked from commit 4be0879)
(cherry picked from commit 4be0879)
(cherry picked from commit 4be0879)
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation