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

fetch sqlite databases from object storage #2643

Closed
vrongmeal opened this issue Feb 14, 2024 · 5 comments
Closed

fetch sqlite databases from object storage #2643

vrongmeal opened this issue Feb 14, 2024 · 5 comments
Labels
feat New feature or request

Comments

@vrongmeal
Copy link
Contributor

Description

#2568 (comment)

@vrongmeal vrongmeal added the feat New feature or request label Feb 14, 2024
@tychoish
Copy link
Contributor

as I was thinking about this, we might be fine to not have a size limit here: we don't have a size limit for any other kind of file, and say, JSON (non-new-line) and excel would all run into size limits in the same way (parquet and csv and ndjson and bson can all be streamed), so we might as well just download whatever now and solve the limited space issue separately.

@talagluck
Copy link
Contributor

Beyond just being able to hit this in object storage from one of the major cloud providers, it would be nice to access this anywhere it's available, e.g. GitHub:

CREATE EXTERNAL DATABASE census_names
FROM sqlite
OPTIONS (
location = 'http://2016.padjo.org/files/data/starterpack/census/census2000names.sqlite',
);

@tychoish tychoish changed the title Pull sqlite DB from cloud (if size ~ < 1 GB) fetch sqlite databases from cloud Mar 8, 2024
@tychoish
Copy link
Contributor

tychoish commented Mar 8, 2024

I think it makes sense to just use tempfiles tied to the lifetime of the SQLite Access object: if we get something that isn't a pathbuf, download it, write it to the tempfile and then go from there as "normal."

Need to take extra care to avoid writing to these temporary databases.

If/when we add support for COPY TO we'll just have to be careful to restrict support there too.

@tychoish tychoish changed the title fetch sqlite databases from cloud fetch sqlite databases from object storage Mar 8, 2024
@talagluck
Copy link
Contributor

How would that interact with the INSERT INTO feature just added in #2745?

@tychoish
Copy link
Contributor

tychoish commented Mar 8, 2024

We'd have to prevent inserts in these cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants