Skip to content

deal with missing values #16

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calvinmetcalf
Copy link

both of the ,, and NULL variety inspired by mafintosh/csv-parser#31

@max-mapper
Copy link
Owner

Hmm, while I can see the benefit of this in certain situations, it can be considered 'lossy' since an empty field and NULL could mean different things semantically. Kind of like how we added integer parsing support but then reverted it because I decided everything in CSV should be treated as a string #15 (comment)

Maybe by that logic then ,, should turn into "", and ,NULL, into "NULL"

@calvinmetcalf
Copy link
Author

so normally I'd agree but on the other hand this is the default way sqlserver generates CSVs and somebody complaining about 'why is my text field full of NULL strings is how this came to my attention. I could just filter out all NULL values but since sqlserver does go to the trouble of quoting some things that means if we treat NULL and 'NULL' the same we may be loosing info.

@max-mapper
Copy link
Owner

Hmm yea that makes sense, you need the parser to do it. Maybe we can make this optional? E.g. an optional test here and an option in the parser

@calvinmetcalf
Copy link
Author

sounds sensible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants