-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Writing CSV headers only [feature request?] #92
Comments
@Kitanotori I agree in that it seems like a reasonable thing to be able to write "empty" files, i.e. just header line, no data lines. Does this not work by using |
@cowtowncoder I was able to confirm that doing what you suggested does indeed write the header. Thanks for the tip! Would be nice of course if this was provided explicitly through the API somehow. |
Was this ever added? I have similar case where i want to write csv but in a streaming way. |
See my response: it was already possible to do, as confirmed by @amr. Will close. |
@amr That is via API, fwtw. But I guess you mean something like a convenience method or so. |
I have a case when there might be no actual input, but I still want to output an empty CSV file containing the headers. Due to the streaming nature, I don't know beforehand whether there will be input objects or not, so I want to write the headers first. Is there a way to get the headers as a String, byte[], etc.?
EDIT: found a way to get the header as a string, but surely there's a better way?
The text was updated successfully, but these errors were encountered: