Skip to content

Conversation

@jsjasonseba
Copy link
Contributor

@jsjasonseba jsjasonseba commented May 4, 2025

This PR introduces a new operator MaxComputeSQLOperator and two new hooks MaxComputeHook and AlibabaBaseHook to the Alibaba Provider.

MaxCompute is a fully-managed data warehouse solution provided by Alibaba Cloud.

The MaxComputeSQLOperator provides functionality to execute SQL statements in MaxCompute.
The MaxComputeHook provides initial functionality, including run_sql, get_instance, and stop_instance.
Additional hook methods, operators, and deferrable mode are next inline for development.

Most of Alibaba services relies on similar access key authentication. The AlibabaBaseHook serves 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 as OSSHook may benefit from refactoring to leverage AlibabaBaseHook due 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.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@jsjasonseba jsjasonseba changed the title Alibaba provider maxcompute Add MaxComputeHook and AlibabaBaseHook to Alibaba Provider May 4, 2025
@jsjasonseba jsjasonseba force-pushed the alibaba-provider-maxcompute branch from a46a838 to 83540fb Compare May 10, 2025 17:44
@jsjasonseba jsjasonseba changed the title Add MaxComputeHook and AlibabaBaseHook to Alibaba Provider Add MaxComputeSQLOperator, MaxComputeHook and AlibabaBaseHook to Alibaba Provider May 10, 2025
@jsjasonseba
Copy link
Contributor Author

Hi @eladkal,
would you mind reviewing this PR when you have a chance? I saw that you previously reviewed changes related to the Alibaba provider, so your input here would be valuable. Thanks!

@jsjasonseba
Copy link
Contributor Author

cc @potiuk @kaxil

@jsjasonseba
Copy link
Contributor Author

Hi @Lee-W @hussein-awala , would you mind reviewing this PR?

@Lee-W Lee-W self-requested a review May 16, 2025 02:25
@Lee-W
Copy link
Member

Lee-W commented May 16, 2025

Hi @Lee-W @hussein-awala , would you mind reviewing this PR?

Will take a look 🙂

Copy link
Member

@Lee-W Lee-W left a 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

Copy link
Member

@Lee-W Lee-W left a 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 🙂

@jsjasonseba
Copy link
Contributor Author

Made some adjustment to conn_name_attr for styling consistencies with other alibaba hooks

@jsjasonseba jsjasonseba requested a review from Lee-W May 27, 2025 16:29
Copy link
Member

@Lee-W Lee-W left a 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

@jsjasonseba jsjasonseba requested a review from Lee-W May 29, 2025 07:47
@Lee-W Lee-W merged commit 64e2892 into apache:main May 30, 2025
67 checks passed
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
…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>
jose-lehmkuhl pushed a commit to jose-lehmkuhl/airflow that referenced this pull request Jul 11, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants