Hi David, Amogh, Thank you both for turning the thread into AIP-132. I'm really glad to see this moving forward.
I think I could help with the folder-marker rule, since I worked on those fixes, or with reporting what was copied, since I worked on the return values of several transfer operators under #11323. That said, I'd like to contribute wherever it's needed. While looking into this, I also went through the 28 file-to-file operators in phase 1. 16 of them already have a filesystem in Airflow at both ends (S3, GCS, Azure Blob, SFTP, local), so they only need the phase 1 operator. The other 12 need more investigation and some changes first: - ADLS (ADLSToGCSOperator, LocalFilesystemToADLSOperator): they still read or write through the Gen1 hook, so moving them to abfs also means moving them to Gen2. (ADLSToGCSOperator already lists through Gen2.) - FTP (FTPToS3Operator, S3ToFTPOperator) and SMB (GCSToSambaOperator): the filesystem needs to be registered in Airflow. fsspec already has implementations. - Google Drive (GCSToGoogleDriveOperator, GoogleDriveToGCSOperator, GoogleDriveToLocalOperator, LocalFilesystemToGoogleDriveOperator): only a third-party fsspec implementation exists, and Drive is ID-based rather than path-based. - Azure File Share (AzureFileShareToGCSOperator): there is no fsspec implementation yet. - Glacier (GlacierToGCSOperator) and IMAP (ImapAttachmentToS3Operator): they aren't file copies (a vault inventory retrieval and mail attachments), so they may not belong in phase 1. I'm also happy to look into these 12 if that helps. Best, Yuseok On Thu, Nov 26, 2026 at 12:52 AM Aldo Escobar <[email protected]> wrote: > Hi David, > > Thanks for writing up AIP-132, it reads really well. +1, and I'd be glad to > co-author it, mainly on phase 1 and the shared behaviour suite (my earlier > reply ended up in a separate thread, sorry about that). > > Since Amogh's point was that FileTransferOperator only copies one object, I > gave phase 1 a try on the real APIs. It's a small subclass of common.io > FileTransferOperator on ObjectStoragePath (Airflow 3.4) that copies a whole > prefix: it lists once, skips folder markers from that same listing, can > skip existing keys, and returns the copied keys. Within one store it uses > ObjectStoragePath.copy, across stores it streams in chunks, and a single > file behaves exactly as today. It passes on local and S3/GCS/Azure > emulators; deferrable mode, OpenLineage and real cloud accounts are still > to do. Code and a short write-up against the AIP's open items: > https://github.com/aoelvp94/airflow-generic-transfer-contract-demo/pull/12 > > A few thoughts on the open questions, happy to be argued out of any of > them: > - Folder markers: classify them from the one listing, so no backend needs > an extra call per key. > - Native fast path: start with same-store copy, then let a hook optionally > say "I can do this natively". > - Pages: Arrow batches for tabular sources, dicts for REST, sized by the > source, so memory follows the batch rather than the dataset. > > On that last one, two data points (one machine, small n): > - Streaming Arrow batches end to end keeps peak memory at ~95 MB for 1M > rows, vs ~344 MB when converting to rows first, and it stays flat at 4x the > rows. > - Postgres -> S3, 1M rows: SqlToS3Operator took 14 s and peaked at ~1.35 > GiB; a streaming @task did it in 5.3 s at ~234 MiB, same output ( > https://github.com/aoelvp94/airflow-transfer-bench). > > Not a knock on the operator, it has to cover every case. But I've run > transfers in pods, where peak memory decides the pod size, so having the > streaming in the hook once instead of in each operator matters a lot to me. > > On the regression concern: in an earlier prototype, one generic operator > matched the existing ones on 34 of 35 checks across the 9 S3/GCS/Azure > pairs, and the one miss was a real bug in S3ToAzureBlobStorageOperator ( > https://github.com/apache/airflow/issues/76880, fix in > https://github.com/apache/airflow/pull/76971). So I see a shared behaviour > suite as the safety net, and I'm happy to start it. > > Thanks, > Aldo >
