[MDEV-19744] Support null values in CSV files Created: 2019-06-13  Updated: 2019-06-13

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Connect
Fix Version/s: None

Type: Task Priority: Major
Reporter: Robert Aarts Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None


 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".


Generated at Thu Feb 08 08:54:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.