datafusion
datafusion copied to clipboard
docs: add example for custom file format with `COPY TO`
Which issue does this PR close?
Closes #11079
Rationale for this change
Adds an example of for how to COPY table TO a custom file format.
What changes are included in this PR?
Created sort of a mock file format factory and file format that just wrap the CSV one but for a TSV.
Are these changes tested?
yes, I've run the example
Are there any user-facing changes?
no
~Seem to be failing in CI due to being out space on the worker.~ Potentially fixed with a change to the build script.
Yeah, I started down the road of something custom, but it turned out to be a non-trivial amount of code.
Perhaps adding a link to something like https://github.com/datafusion-contrib/datafusion-orc would show a more complex example, though it doesn't implement create_writer_physical_plan yet.
Thanks again @tshauck and @devinjdangelo