-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Add ADLSCreateObjectOperator
#37821
Add ADLSCreateObjectOperator
#37821
Conversation
…ataLakeStorageV2Hook and added DataToADLSOperator which allows uploading data (e.g. from an XCOM) to a remote file without the need to have a local file created first
…moved it under adls operator module
tests/providers/microsoft/azure/transfers/test_local_to_adls.py
Outdated
Show resolved
Hide resolved
It's just 3 lines. It would be simpler to just re-add these lines to the file (they exist in main but not in your branch) then just commit it. Once you do that the diff will be no changes to the file. Feel free to send me message on Slack if you need help |
Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
Hello Edal, first of all thank you for your patience now I fully understand what happend. This file is indeed not the same as the main branch (I forgot to sync main on my repo hence why I didn't see the latestes updates and diff). But it should be changed, because it contains remains of the test of that new operator I had to remove back then if you remember, but on that PR I apparently forgot to remove those unused constants. Those constants are not used in that test anymore, so I would keep the changes as they clean up the test, but if you prefer to keep it then I will re-add those 3 lines if you want. Let me know what you I have to do. |
OK now i get it. So all left here is just to fix the doc build. |
Exactly, it was my mistake as I didn't clean up the test well in my previous pull request hence all the confussion, so apologies once again. Yeah the doc thing is a mysterie to me imho, some help or some pointers in a direction could help here :) |
hard to tell. |
I reverted that change but the error stays the same |
This reverts commit a3753e9.
@eladkal I finally managed to make the build pass, I kept the example for the list operator as I found what was causing the issue ( a missing single quote :)) |
Thanks @eladkal :) |
Hello, as discussed in the previous PR I created this new pull request for introducing the DataToADLSOperator. This operator allows you to use the AzureDataLakeStorageV2Hook without the need to write custom python code to interact with the Hook.
There is already a LocalFilesystemToADLSOperator which uses the older AzureDataLakeHook, but that operator doesn't allow you to directly store an XCom to Fabric, you need to create a local file first before uploading it, which in this case would mean creating an additional task to do it while in fact it's not necessary as the AzureDataLakeStorageV2Hook allows you to achieve the same without that intermediate step.
That's why I introduced this DataToADLSOperator, we already use it at our company as a custom operator and it works great as this easily allows you to upload an XCom to Fabric, without the need to write python code interacting with the AzureDataLakeStorageV2Hook. This means a more consice DAG, less code which improves readability and reduces complexity and of course makes it easy to use.
Here is a simplified example on how to use the operator:
^ 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 newsfragments.