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

Compressed(gzip) csv files support. #4039

Open
smagellan opened this issue Apr 6, 2024 · 2 comments
Open

Compressed(gzip) csv files support. #4039

smagellan opened this issue Apr 6, 2024 · 2 comments

Comments

@smagellan
Copy link

smagellan commented Apr 6, 2024

Hello.

Code should be easy given all the chores are encapsulated within CSVREAD/CSVWRITE functions. I will try to write that code and create the PR if there are no objections against that functionality. Just let me know, if any.

@smagellan smagellan changed the title Compressed csv files support. Compressed(gzip) csv files support. Apr 6, 2024
@katzyn
Copy link
Contributor

katzyn commented Apr 7, 2024

Both CSVREAD and CSVWRITE have significant design flaws. Modern versions of H2 don't have any universal data type any more and there is no way to specify data types to parse values from CSV properly. There are some problems with really large files, parameters are obscure and so on. From my personal point of view, we should deprecate both these functions and introduce a better designed replacement for them. Maybe something similar to the COPY command from PostgreSQL or whatever else. We can try to add additional filters in the new API, but changes in these legacy functions are premature at this point, but If you need a quick fix, your can write some user-defined functions for your application.

GZIP actually provides relatively low compression ratio for files in this format, so if we'll introduce it, the next feature request will be about BZIP2, PPMd or other compression method. Maybe possibility to pass data to a third-party program and read data from a third-party program will be a better option, but it should be carefully reviewed from a security perspective.

@manticore-projects
Copy link
Contributor

manticore-projects commented Apr 7, 2024 via email

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

3 participants