Skip to content

Improve NULL value handling #15

Open
@blancadesal

Description

@blancadesal

The SQL parser is as wrapper around Python's csv library, which translates all NULL values into the empty string. Depending on the use case, it could be preferable to give the user a choice between '' and None, especially for numerical fields.

This is an intrinsic limitation of the csv module. From the docs:

To make it as easy as possible to interface with modules which implement the DB API, the value None is written as the empty string. While this isn’t a reversible transformation, it makes it easier to dump SQL NULL data values to CSV files without preprocessing the data returned from a cursor.fetch* call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    medium priorityNot urgent but still important

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions