-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Add MaxComputeSQLOperator, MaxComputeHook and AlibabaBaseHook to Alibaba Provider #50178
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
Conversation
a46a838 to
83540fb
Compare
|
Hi @eladkal, |
|
Hi @Lee-W @hussein-awala , would you mind reviewing this PR? |
Will take a look 🙂 |
Lee-W
left a comment
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.
not yet finish the whole review but left a few comments
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/base_alibaba.py
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/base_alibaba.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/operators/maxcompute.py
Show resolved
Hide resolved
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
Lee-W
left a comment
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.
mostly good, left a few nitpicks 🙂
providers/alibaba/src/airflow/providers/alibaba/cloud/operators/maxcompute.py
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/operators/maxcompute.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
|
Made some adjustment to |
Lee-W
left a comment
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.
Mostly looks good. left a few nits
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/maxcompute.py
Outdated
Show resolved
Hide resolved
providers/alibaba/tests/unit/alibaba/cloud/hooks/test_maxcompute.py
Outdated
Show resolved
Hide resolved
…aba Provider (apache#50178) * Add MaxComputeHook and AlibabaBaseHook * Remove unecessary init override * Fix word spelling * Add type hints and docstrings to MaxComputeHook and AlibabaBaseHook * Set priority from hints if not explicitly provided * Add odps to spelling wordlist * Add stop_instance method to MaxComputeHook * Add MaxComputeSQLOperator * Fix docstring * Add maxcompute to wordlist * Add alibaba test_version_compat.py to overlooked test list * Add test for MaxComputeLogViewLink * Simplify fallback logic Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Change error logging to use log.exception Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Simplify logics * Make arguments keyword-only * Create MaxComputeConfigurationException for configuration issues * Add test for MaxComputeConfigurationException * Simplify code Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Simplify code * Simplify code * Adjust connection arg name for styling consistency with other hooks * Adjust connection arg name for styling consistency with other hooks * Refactor code * Refactor code --------- Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…aba Provider (apache#50178) * Add MaxComputeHook and AlibabaBaseHook * Remove unecessary init override * Fix word spelling * Add type hints and docstrings to MaxComputeHook and AlibabaBaseHook * Set priority from hints if not explicitly provided * Add odps to spelling wordlist * Add stop_instance method to MaxComputeHook * Add MaxComputeSQLOperator * Fix docstring * Add maxcompute to wordlist * Add alibaba test_version_compat.py to overlooked test list * Add test for MaxComputeLogViewLink * Simplify fallback logic Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Change error logging to use log.exception Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Simplify logics * Make arguments keyword-only * Create MaxComputeConfigurationException for configuration issues * Add test for MaxComputeConfigurationException * Simplify code Co-authored-by: Wei Lee <weilee.rx@gmail.com> * Simplify code * Simplify code * Adjust connection arg name for styling consistency with other hooks * Adjust connection arg name for styling consistency with other hooks * Refactor code * Refactor code --------- Co-authored-by: Wei Lee <weilee.rx@gmail.com>
This PR introduces a new operator
MaxComputeSQLOperatorand two new hooksMaxComputeHookandAlibabaBaseHookto the Alibaba Provider.MaxComputeis a fully-managed data warehouse solution provided by Alibaba Cloud.The
MaxComputeSQLOperatorprovides functionality to execute SQL statements in MaxCompute.The
MaxComputeHookprovides initial functionality, includingrun_sql,get_instance, andstop_instance.Additional hook methods, operators, and deferrable mode are next inline for development.
Most of Alibaba services relies on similar access key authentication. The
AlibabaBaseHookserves as a utility base class providing access key credential and base connection form, supporting the MaxComputeHook and other hooks to be implemented in the future. Existing hooks such asOSSHookmay benefit from refactoring to leverageAlibabaBaseHookdue to similar auth mechanism.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.