Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
I think
--tab
|
export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like:
"City","State","Zip"
"New York","New York","10001"
"Washington","District of Columbia","20002"
Perhaps
--prefix-data-by-column-names
|
, which can only be used together with
--tab
|
, would match the style of other options.
Attachments
Issue Links
- causes
-
MDEV-29889 mysqldump --tab --header is slow
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
I think `--tab` export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {/quote} Perhaps `--prefix-data-by-column-names`, which can only be used together with `--tab`, would match the style of other options. |
I think `--tab` export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps `-\-prefix-data-by-column-names`, which can only be used together with `--tab`, would match the style of other options. |
Description |
I think `--tab` export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps `-\-prefix-data-by-column-names`, which can only be used together with `--tab`, would match the style of other options. |
I think `--tab` export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps {{--prefix-data-by-column-names}}, which can only be used together with {{--tab}}, would match the style of other options. |
Description |
I think `--tab` export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps {{--prefix-data-by-column-names}}, which can only be used together with {{--tab}}, would match the style of other options. |
I think {{{{noformat}--tab{{noformat}}}} export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps {{{{noformat}}--prefix-data-by-column-names{{noformat}}}}, which can only be used together with {{{{noformat}}--tab{{noformat}}}}, would match the style of other options. |
Description |
I think {{{{noformat}--tab{{noformat}}}} export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps {{{{noformat}}--prefix-data-by-column-names{{noformat}}}}, which can only be used together with {{{{noformat}}--tab{{noformat}}}}, would match the style of other options. |
I think {{{noformat}--tab{noformat}}} export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like: {quote} "City","State","Zip" "New York","New York","10001" "Washington","District of Columbia","20002" {quote} Perhaps {{{noformat}--prefix-data-by-column-names{noformat}}}, which can only be used together with {{{noformat}--tab{noformat}}}, would match the style of other options. |
Labels | beginner-friendly |
Summary | [Feature Request] --tab export with column names header row | --tab export with column names header row |
Summary | --tab export with column names header row | mysql client: --tab export with column names header row |
Workflow | MariaDB v3 [ 106919 ] | MariaDB v4 [ 131253 ] |
Summary | mysql client: --tab export with column names header row | mysqldump client: --tab export with column names header row |
Assignee | Daniel Black [ danblack ] |
Fix Version/s | 10.11.1 [ 28454 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue causes |
I have submitted the PR #1937 on this issue, which provides a new option --header.
Invoking mysqldump database --tab <path> --header adds a header row with column names to the text files generated by --tab. The options --fields-terminated-by, --fields-enclosed-by, --fields-optionally-enclosed-by and --lines-terminated-by also apply to the header row. If the --header option is used without a leading --tab option, an error occurs