Skip to content

Permit composite URL protocol schemes in infer_storage_options - #2085

Merged
martindurant merged 1 commit into
fsspec:masterfrom
dlt-contrib:composite-url-protocol-scheme
Jul 22, 2026
Merged

Permit composite URL protocol schemes in infer_storage_options#2085
martindurant merged 1 commit into
fsspec:masterfrom
dlt-contrib:composite-url-protocol-scheme

Conversation

@amotl

@amotl amotl commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Hi there. In omniload, we are using composite URL protocol schemes like https+webdav://, mongodb+srv://, or mysql+pymysql://. While the code used custom auxiliary/helper functions before, we are now aiming to modernize and refactor a bit, for example towards using fsspec.utils.infer_storage_options across the board. On this occasion, we found that a specific regex pattern needed a minor adjustment to permit such URL protocol schemes that include a + character.

@amotl
amotl force-pushed the composite-url-protocol-scheme branch from eb8ca54 to 9e6585d Compare July 21, 2026 14:14
@amotl
amotl marked this pull request as ready for review July 21, 2026 14:39
@martindurant

Copy link
Copy Markdown
Member

What is fsspec supposed to do with there composite protocols, though - do they map onto omniload only and exactly?

Aside: omniload and intake should probably talk. Intake is caring less about writing yaml catalogues and pipelines, and (if anything) more about guessing file types and providing dataset summaries. Enumerating in detail all the things duckdb knows how to do, and providing a clear way to determine dataset invocation and summary all sound like good ideas.

@amotl

amotl commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi Martin,

thanks for your swift reply.

What is fsspec supposed to do with there composite protocols, though - do they map onto omniload only and exactly?

In our case, omniload is responsible for routing and dispatching of protocol schemes to dlt-based components that wrap the fsspec filesystem implementations. In this spirit, fsspec will probably not do anything specific to them today other than treating them opaquely, which seems to work well.

We just recently discovered infer_storage_options as a useful utility to streamline the downstream auxiliary logic around fsspec details in omniload, with that minor drawback. If it is not applicable or possible to adjust this utility function so it can be reused in omniload, we will either need to work around it or vendorize it.

Aside: omniload and intake should probably talk.

Thank you for quickly demonstrating ingredients of Intake. Indeed, that sounds nice. I've started a discussion thread so the conversation can grow beyond this specific PR discussion. 🙇

With kind regards,
Andreas.

Comment thread fsspec/utils.py Outdated
@amotl
amotl force-pushed the composite-url-protocol-scheme branch from 9e6585d to 09691f2 Compare July 22, 2026 09:15
@amotl
amotl requested a review from Sanjays2402 July 22, 2026 09:17
@amotl
amotl force-pushed the composite-url-protocol-scheme branch from 09691f2 to 0feb3de Compare July 22, 2026 10:05
@martindurant

Copy link
Copy Markdown
Member

Please check the test failures: I think they are all cases where the protocol is omitted completely, which should result in the default "file", but the URL otherwise unchanged. These protocol-less URLs can contain some variants (not just "/...") due to windows.

@amotl
amotl force-pushed the composite-url-protocol-scheme branch from 0feb3de to 5b5ede6 Compare July 22, 2026 14:04
Examples: https+webdav://, mongodb+srv://, mysql+pymysql://
@amotl
amotl force-pushed the composite-url-protocol-scheme branch from 5b5ede6 to 39d94ba Compare July 22, 2026 14:04
@amotl

amotl commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Apologies. I made a mistake when refactoring the code block a bit to make it more readable. Should be fixed now.

@martindurant
martindurant merged commit 7a9b98b into fsspec:master Jul 22, 2026
11 checks passed
@amotl

amotl commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for merging!

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.

3 participants