I thought I replied to this already, but I like the direction you are going 
with it.

On 2026/11/11 11:03:31 Blain David wrote:
> Thanks for you reply Yuseok.
> 
> Glad you're willing to help on this one, it will be needed as it's a huge one!
> 
> I understand your worries regarding regression on the generic logic, as this 
> is indeed something we need to be careful about.
> 
> But I was thinking of having the specific operators extending the generic one 
> of some sort once ready, that way, we keep the provider specific tests but 
> using the generic one underneath.
> The provider specific transfer tests can stay anyway, even when those 
> deprecated operators would then be removed, because those will continue to 
> test the GenericTransfer (or whatever it will be) using the hooks defined in 
> that provider.
> 
> Of course those are already implementation details, but those are things we 
> can discuss once we see there is traction for this and we initiate an AIP for 
> this.
> 
> Kind regards,
> David
> 
> 
> 
> ________________________________
> From: Yuseok Jo <[email protected]>
> Sent: Tuesday, November 10, 2026 15:52
> To: [email protected] <[email protected]>
> Subject: Re: [DISCUSS] One transfer operator on hook contracts instead of one 
> operator per source/destination pair
> 
> EXTERNAL MAIL: Indien je de afzender van deze e-mail niet kent en deze niet 
> vertrouwt, klik niet op een link of open geen bijlages. Bij twijfel, stuur 
> deze e-mail als bijlage naar [email protected]<mailto:[email protected]>.
> 
> Hi David,
> 
> Thanks for starting this, +1 from me. Having fixed the folder marker issue
> in several transfer operators across the AWS, GCP and Azure providers, I'd
> be glad to see it solved once.
> 
> That said, one thing I'm a little worried about is that a regression in the
> generic logic would reach every pair at once, while in those fixes each
> change only affected the two services of its pair.
> 
> Happy to help where I can.
> 
> Best regards,
> Yuseok
> 
> 
> On Mon, Nov 9, 2026 at 6:49 PM Blain David <[email protected]> wrote:
> 
> > Hi all,
> >
> > While reviewing #76408 [1] I noticed it was the fourth fix of the same bug.
> >
> > Object stores create a zero-byte "folder marker" for every folder. A
> > transfer operator that lists keys and copies them one by one either fails
> > on the marker or copies it as an empty object. The same rule (skip a marker
> > that has keys under it) was applied to S3ToGCSOperator [2], GCSToS3Operator
> > [3], AzureBlobStorageToS3Operator [4] and S3ToAzureBlobStorageOperator [1].
> > That is four PRs in three providers over six months, and main now carries
> > three copies of the same helper, because provider packages cannot share
> > code without a version floor. Nobody did anything wrong there. The
> > structure leaves no other option.
> >
> > The structure is one operator per source/destination pair. On main today I
> > count 86 transfer modules, about 17,500 lines, in 13 providers (google 37,
> > amazon 21, microsoft.azure 6, apache.hive 6, and nine smaller ones). Sorted
> > by what they do, roughly:
> >
> >   *
> > 28 copy files from one store to another (S3, GCS, Azure Blob, ADLS, SFTP,
> > FTP, local, Drive, Samba)
> >   *
> > 16 move rows from one database to another
> >   *
> > 11 load files into a database
> >   *
> > 26 read records from a database or an API and write them to files
> > (SqlToS3, HttpToS3, HttpToGCS, MongoToS3, SalesforceToGCS, and
> > BaseSQLToGCSOperator with six dialect subclasses)
> >   *
> > 5 send records elsewhere (Slack, Sheets)
> >
> > Every fix and every feature (pagination, a file format, async, lineage)
> > lands in one of them and is missing from the others. HttpOperator can
> > paginate, for example; HttpToS3Operator and HttpToGCSOperator cannot.
> > We have been here before, and we solved it. Until 2022 every database
> > provider shipped its own operator. common.sql 1.3 replaced them with
> > SQLExecuteQueryOperator on top of the DbApiHook contract, the dialect moved
> > into the hooks, and the specific operators became deprecated shells. AIP-14
> > "Create composable operators using common interfaces" [5] asked for the
> > same thing for transfers in 2019: hooks behind a common interface and one
> > copy operator that takes a source hook and a destination hook. It was only
> > partly implemented. Its file half landed as AIP-58 [6], which gave us
> > ObjectStoragePath, and FileTransferOperator in common.io, since Airflow
> > 2.8. The AIP-14 page is marked "Superseded & Completed" by AIP-58 since
> > 2024, but the goal it was written for, no more X-to-Y operators, was never
> > reached.
> >
> > So AIP-14 is incomplete in two ways.
> >
> >   1.
> > The migration never happened for files. FileTransferOperator copies
> > between any two registered filesystems, but the 28 pair operators were
> > never rebased on it or deprecated. They are still what users find first,
> > and what we keep fixing one by one.
> >   2.
> > There is no contract for sources that produce records instead of files:
> > paginated HTTP/REST and SaaS APIs, and SQL when the destination is a file.
> > AIP-14 mentions databases in one line and AIP-58 did not cover them. This
> > is where new pair operators keep coming from. In my own team the latest
> > request was an "MSGraphToS3Operator".
> >
> > The direction I would like to discuss, not a design yet:
> >
> >   *
> > Reading in batches, pagination included, is a capability of the hook, as
> > get_df_by_chunks is for SQL. #75649 [7] proposes the same for MS Graph.
> >   *
> > One generic operator connects a source hook to a destination hook.
> > GenericTransfer looks like the natural starting point: it already takes
> > source_hook_params and destination_hook_params for the two hooks and
> > insert_args for the destination call. With the same on the source side, the
> > arguments of each side are forwarded to that side's hook and checked when
> > the task runs. The operator knows neither vocabulary.
> >   *
> > File destinations go through ObjectStoragePath, so every registered
> > filesystem works.
> >   *
> > The existing pair operators become thin shells and are deprecated on the
> > usual schedule, as the SQL operators were.
> >   *
> > Out of scope here: Aldo is preparing a dedicated proposal on optimising
> > GenericTransfer between ADBC-enabled hooks, moving Arrow record batches end
> > to end instead of Python rows. That proposal stands on its own and I do not
> > want to mix the two threads. It fits this direction well, since it also
> > puts the capability in the hooks and keeps the operator generic.
> >
> > My questions to the list:
> >
> >   1.
> > Do we agree that the per-pair operators are a maintenance problem worth
> > solving, and should we stop accepting new ones in the meantime?
> >   2.
> > Can step one happen without any new design: rebase the file-to-file
> > operators on ObjectStoragePath and deprecate them in favour of
> > FileTransferOperator?
> >   3.
> > For record sources, where should the contract and the operator live:
> > common.sql next to GenericTransfer, common.io next to
> > FileTransferOperator, or somewhere new?
> >   4.
> > Does this need a new AIP? I think it does. AIP-14 is seven years old and
> > closed, so a new one would reference it and cover the part that was never
> > implemented.
> >
> > I also remember TP presenting something similar at Airflow Summit last
> > year, I believe in "Assets: Past, Present, Future" [8], where Connection,
> > Object Storage and Asset were tied closer together. TP, please correct me
> > if I remember it wrong; I am especially interested in how this would fit
> > with what you have in mind.
> >
> > I am willing to drive this: write the AIP if the list agrees one is
> > needed, and implement it. It touches many providers though, so everyone who
> > wants to contribute or help is very welcome. The author of the four
> > folder-marker fixes has already offered to join [1].
> >
> > Best regards,
> > David
> >
> > [1] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F76408&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535715773%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=a1Jt820MbmQEDg9iBn0vfNTSjBXbRurD3CiX7lkqUoM%3D&reserved=0<https://github.com/apache/airflow/pull/76408>
> > [2] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F65724&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535729724%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=P1Q3Pjmj0e6K3Z%2BC0XeARfRudaFd9WuHLbW4adJoBlk%3D&reserved=0<https://github.com/apache/airflow/pull/65724>
> > [3] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F72497&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535736466%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=22aayoMyUTTdYQK4BfA7v%2F7UzjtwaqtxZGwGsWhzl20%3D&reserved=0<https://github.com/apache/airflow/pull/72497>
> > [4] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F72892&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535742451%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=wLmsc4HZA4%2BAlaGCBbaDv4dvKRoqDVGDAtgxxl5vVr0%3D&reserved=0<https://github.com/apache/airflow/pull/72892>
> > [5]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fspaces%2FAIRFLOW%2Fpages%2F103091837%2FAIP-14%2BCreate%2Bcomposable%2Boperators%2Busing%2Bcommon%2Binterfaces&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535748195%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZxRWRy2caVy59iVnWmDRVQKS4Hv2N2VlqzBms%2BeVSEk%3D&reserved=0<https://cwiki.apache.org/confluence/spaces/AIRFLOW/pages/103091837/AIP-14+Create+composable+operators+using+common+interfaces>
> > [6]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fpages%2Fviewpage.action%3FpageId%3D263430565&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535754416%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=t8N1ptKsW1lNVsg8Jfbm9ucZiQlwkWJxLU4lQ5OCp4o%3D&reserved=0<https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=263430565>
> > [7] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F75649&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535760492%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=dQhpWCI9WFbmFUPhV9R%2BUrbN5OZNVI4MlJ1oWaZHXWk%3D&reserved=0<https://github.com/apache/airflow/pull/75649>
> > [8] 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fairflowsummit.org%2Fsessions%2F2025%2Fassets-past-present-future%2F&data=05%7C02%7Cdavid.blain%40infrabel.be%7Cd26e0c7d707b4b079a9d08df3f3a7a0c%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639299192535766320%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=IR3qTlaEQ1hm7ksbfpLX%2FgUKL27tGUYzqMgMTAOre4w%3D&reserved=0<https://airflowsummit.org/sessions/2025/assets-past-present-future/>
> >
> > General (Internal Property)
> >
> 
> General (Internal Property)
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to