Is your feature request related to a problem or challenge? Please describe what you are trying to do.
It would be great / handy to use the datafusion-cli to transform data and write the transformed data to another format (e.g. convert from CSV to parquet, with possibly some transformations along the way.
Describe the solution you'd like
I propose adding the INTO clause like clickhouse or mysql;
https://clickhouse.com/docs/en/faq/integration/file-export/
https://dev.mysql.com/doc/refman/5.7/en/select-into.html
So one could export the contents of a table into a file using a command such as
SELECT * FROM table INTO OUTFILE 'file' FORMAT CSV
Like #1213 I think this feature should be something that can be disabled for those implementations that do not want to allow their users to write to local files
Describe alternatives you've considered
We could potentially leave such features out of datafusion, as it exists in tools that use DataFusion such as https://github.com/roapi/roapi/tree/main/columnq-cli#format-conversion
Note that postgres uses the COPY command for the same purpose -- https://www.postgresql.org/docs/8.1/sql-copy.html
So like COPY foo to 'file'
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
It would be great / handy to use the
datafusion-clito transform data and write the transformed data to another format (e.g. convert from CSV to parquet, with possibly some transformations along the way.Describe the solution you'd like
I propose adding the
INTOclause like clickhouse or mysql;https://clickhouse.com/docs/en/faq/integration/file-export/
https://dev.mysql.com/doc/refman/5.7/en/select-into.html
So one could export the contents of a table into a file using a command such as
Like #1213 I think this feature should be something that can be disabled for those implementations that do not want to allow their users to write to local files
Describe alternatives you've considered
We could potentially leave such features out of datafusion, as it exists in tools that use DataFusion such as https://github.com/roapi/roapi/tree/main/columnq-cli#format-conversion
Note that postgres uses the
COPYcommand for the same purpose -- https://www.postgresql.org/docs/8.1/sql-copy.htmlSo like
COPY foo to 'file'Additional context