Skip to content

Support cloud URI globs in DocumentLoaderOperator - #70299

Merged
guan404ming merged 1 commit into
apache:mainfrom
guan404ming:common-ai-cloud-glob
Jul 24, 2026
Merged

Support cloud URI globs in DocumentLoaderOperator#70299
guan404ming merged 1 commit into
apache:mainfrom
guan404ming:common-ai-cloud-glob

Conversation

@guan404ming

Copy link
Copy Markdown
Member

Why

  • DocumentLoaderOperator accepted glob patterns for local paths but rejected them for cloud storage URIs, so loading documents from s3://bucket/logs/**/*.json was impossible.
  • Cloud sources were limited to a single object or one flat directory, forcing users to add an extra task just to list files.

How

  • Route cloud URIs containing wildcards through ObjectStoragePath.glob(), which supports recursive ** matching across directories.
  • Reject wildcards in the scheme or bucket segment with a clear error, since those have no fixed root to glob from.
  • Apply the same filtering rules as local globs, so behaviour matches between local and cloud sources.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

@guan404ming
guan404ming force-pushed the common-ai-cloud-glob branch from 2120d67 to 81a39b7 Compare July 23, 2026 12:59
@guan404ming guan404ming changed the title Support cross-directory globs in DocumentLoaderOperator cloud URIs Support cloud URI globs in DocumentLoaderOperator Jul 23, 2026
@guan404ming
guan404ming marked this pull request as ready for review July 23, 2026 13:04
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/document_loader.py Outdated
@guan404ming
guan404ming force-pushed the common-ai-cloud-glob branch from 81a39b7 to 85bb4ce Compare July 23, 2026 14:15
@guan404ming
guan404ming merged commit 832d0a5 into apache:main Jul 24, 2026
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants