Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to register a http url to the object_store #4491

Closed
elliot14A opened this issue Dec 3, 2022 · 7 comments
Closed

How to register a http url to the object_store #4491

elliot14A opened this issue Dec 3, 2022 · 7 comments

Comments

@elliot14A
Copy link

I was trying to register a http url to the object_store I was not able to find any examples on how to do it. I was able to successfully use and register s3 urls but, cannot find a way on how to use http.
register_object takes scheme, host, object_store as arguments can anybody help on how to pass http url to this function and register.

@tustvold
Copy link
Contributor

tustvold commented Dec 5, 2022

What API does this HTTP server expose? Is it an object store?

@elliot14A
Copy link
Author

Yes @tustvold !

@tustvold
Copy link
Contributor

tustvold commented Dec 7, 2022

Depending on the API it exposes you should be able to do something like

let store = AmazonS3Builder::new()
    .with_bucket_name(...)
    .with_endpoint(...)
    .build()
    .unwrap();

ctx.runtime_env()
        .register_object_store("http", "", store);

@elliot14A
Copy link
Author

elliot14A commented Dec 8, 2022

For example if I have a http url https://some_example.com/blogs.csv

How should I use it to build AmazonS3Builder
what should I pass to with_bucket_name & with_endpoint as parameters

@tustvold
Copy link
Contributor

tustvold commented Dec 8, 2022

Currently DataFusion only supports querying from remote object stores, not arbitrary HTTP servers. I've created apache/arrow-rs#3294 to track adding limited support for this, but DataFusion may require list support, which isn't possible on an arbitrary HTTP server AFAIK

@tustvold
Copy link
Contributor

tustvold commented Jan 4, 2023

This was added in apache/arrow-rs#3380 and will be included in the next release apache/arrow-rs#3422

@tustvold
Copy link
Contributor

This has been released in object_store 0.5.3 - https://docs.rs/object_store/latest/object_store/http/struct.HttpBuilder.html

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

No branches or pull requests

2 participants