Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22200

mysqldump client: --tab export with column names header row

Details

    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

          Activity

            za3k Zachary Vance created issue -
            za3k Zachary Vance made changes -
            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.
            za3k Zachary Vance made changes -
            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.
            za3k Zachary Vance made changes -
            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.
            za3k Zachary Vance made changes -
            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.
            serg Sergei Golubchik made changes -
            Labels beginner-friendly
            serg Sergei Golubchik made changes -
            Summary [Feature Request] --tab export with column names header row --tab export with column names header row
            serg Sergei Golubchik made changes -
            Summary --tab export with column names header row mysql client: --tab export with column names header row
            rmfalves Rui Alves added a comment -

            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

            rmfalves Rui Alves added a comment - 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
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 106919 ] MariaDB v4 [ 131253 ]
            danblack Daniel Black made changes -
            Summary mysql client: --tab export with column names header row mysqldump client: --tab export with column names header row
            danblack Daniel Black made changes -
            Assignee Daniel Black [ danblack ]
            danblack Daniel Black added a comment -

            Thank you very much rmfalves for writing this.

            danblack Daniel Black added a comment - Thank you very much rmfalves for writing this.
            danblack Daniel Black made changes -
            Fix Version/s 10.11.1 [ 28454 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik added a comment - Quoting fixed in https://github.com/MariaDB/server/commit/768a10d02a
            za3k Zachary Vance added a comment -

            Thanks! I think this will make CSV export better

            za3k Zachary Vance added a comment - Thanks! I think this will make CSV export better
            danblack Daniel Black added a comment - > Quoting fixed in https://github.com/MariaDB/server/commit/768a10d02a Thanks serg .

            People

              danblack Daniel Black
              za3k Zachary Vance
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.