How to export with Header Rows
Answered
Using the Dump Data button with either tsv or csv selected and I can't seem to get DataGrip to export the header rows.
I tried setting 'First row is header' in the CSV formats options, but it seems to have no effect.
I assume the solution is straightforward but I'm struggling to find it.
Thanks,
Simon
Please sign in to leave a comment.
I would also like to know this both for CSV exports and for clipboard exports and tried 'First row is header' to no avail
This is the official answer for DataGrip: https://www.jetbrains.com/help/datagrip/2016.3/csv-formats-dialog.html
This is exactly what I want.
It turns out if you select all the rows and click data dump you can select "First Row as Headers" and it adds the column names as headers.
Dear Jet Brains. Please make this default in the next release.
Dear Jet Brain, why is this feature still not there? It is VITAL when doing exports with many columns.
Jet Brains, any update on this?
In general one need to configure CSV formats:
and then to check First row is header for a specified format:
Don't forget to apply your changes.
It is there but not trivial especially when you chose to have another format such as CSV or custom format.
You have to specifically select the target format under "Formats" before selecting "First row is header" as otherwise your changes are applied only to the default format which is TSV :) This took me a while to figure this out. Hope this helps someone.
Navigation(Intellij 2018.2)
Right click on query results -> Data Extractor -> Configure CSV Formats.
Here is the trick Select your target format under "Formats" first before enabling "First row is header" option.
You must be good to go now.
Hari Krishna, that was my problem exactly! Ty