Skip to content

feat: Add Tencent Cloud COS (cosn://, cos://) FileIO support (#3239)#3242

Open
acake88 wants to merge 1 commit intoapache:mainfrom
acake88:dev/cos-fileio-support
Open

feat: Add Tencent Cloud COS (cosn://, cos://) FileIO support (#3239)#3242
acake88 wants to merge 1 commit intoapache:mainfrom
acake88:dev/cos-fileio-support

Conversation

@acake88
Copy link
Copy Markdown

@acake88 acake88 commented Apr 15, 2026

Rationale for this change

Tencent Cloud Object Storage (COS) is one of the major object storage services in China, widely used in big data workloads with Spark, Flink, and Hive. Hadoop already supports cosn:// scheme natively via hadoop-cos, but PyIceberg currently has no COS support — users cannot access Iceberg tables stored on COS from Python.

This PR adds COS as a storage backend via the fsspec-compatible cosfs library, following the exact same pattern as existing integrations (S3 via s3fs, Azure via adlfs, GCS via gcsfs, HuggingFace via huggingface-hub).

Changes:

  • pyiceberg/io/__init__.py: Added 5 COS configuration properties (cos.secret-id, cos.secret-key, cos.session-token, cos.region, cos.endpoint) and registered cosn:// / cos:// schemes in SCHEMA_TO_FILE_IO
  • pyiceberg/io/fsspec.py: Added _cosn() factory function and registered cosn / cos in SCHEME_TO_FS
  • pyproject.toml: Added cosfs>=2026.3.25 as an optional dependency


Rationale for this change
Tencent Cloud Object Storage (COS) is one of the major object storage services in China, widely used in big data workloads with Spark, Flink, and Hive. Hadoop already supports cosn:// scheme natively via hadoop-cos, but PyIceberg currently has no COS support — users cannot access Iceberg tables stored on COS from Python.

This PR adds COS as a storage backend via the fsspec-compatible cosfs library, following the exact same pattern as existing integrations (S3 via s3fs, Azure via adlfs, GCS via gcsfs, HuggingFace via huggingface-hub).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant