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

Support null values in CSV files

    XMLWordPrintable

Details

    Description

      When using CSV files (reading) using the CONNECT engine it is impossible to make a distinction between explicit zero and null (empty) values, as documented.
      It would be really useful if empty values could be treated as NULL, while at the same time zeros would be read as 0.
      For example:

      colA,colB,colC
      0,10,20
      1,,0
      ,0,22
      3,13,
      

      In the above the third line indicates a row where colB has a NULL value and colC has a zero value. Other NULL values are colA in the 4th line and colC in the 5th line.

      A further refinement would be to have an option to set the (possibly empty) string that defines an explicit NULL. So for the above example that option would be set to "" (the empty string), but in another file it could be a dash: "-", or perhaps "null".

      Attachments

        Activity

          People

            Unassigned Unassigned
            lokkilok Robert Aarts
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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