Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve NULL value handling #15

Open
blancadesal opened this issue Aug 20, 2021 · 0 comments
Open

Improve NULL value handling #15

blancadesal opened this issue Aug 20, 2021 · 0 comments
Labels
medium priority Not urgent but still important

Comments

@blancadesal
Copy link
Member

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.

@blancadesal blancadesal added the medium priority Not urgent but still important label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium priority Not urgent but still important
Projects
None yet
Development

No branches or pull requests

1 participant