add new S3MultiKeySensor#22767
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
|
Hey @riastrad! Thanks for the contribution :) Two notes:
Does this satisfy your usecase, or do you still think this net-new Operator is required? |
|
I think the use case of this sensor will be covered fully with #22737 |
|
Thank you both for the quick responses!
@eladkal thank you for flagging #22737! I didn't see that when I initially skimmed PRs in this repo. A quick look at those changes and I agree that they should satisfy our use case quite well if/when they land in main. I'm definitely happy to close this PR out in favor of #22737, since that appears to be a more robust solution 👍 |
|
Happy to see there is a need for such use case :) |

Over at @sofarocean, we found that the existing S3 sensors did not support one critical use case we had. Specifically, we needed to explicitly check for the presence of multiple S3 keys before continuing on to downstream tasks. If any of the objects were missing, downstream tasks would fail so we needed a sensor that would only resolve to
Trueif all keys were accounted for.Here is the proposed API:
I'm sharing the solution we came up with in case it might prove useful to others with similar use cases. I don't have a clear picture of the broader community's preferred dev ergonomics, so if the code needs to be made more robust or if the Airflow team would prefer that I also add support for multiple buckets, full s3:// urls, etc. please just let me know and I'm happy to update this PR.