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

Access to CSV file column headings for import. #5

Open
davidkellerman opened this issue Oct 31, 2017 · 0 comments
Open

Access to CSV file column headings for import. #5

davidkellerman opened this issue Oct 31, 2017 · 0 comments

Comments

@davidkellerman
Copy link

For the raw import() method, it would be really useful to have access to the column headings that were present in the CSV file. For the use cases where I've been using the raw import, the column names are what direct the further transformation of the data. (The only way to get them now is to extract property names from the imported records, and, since null properties are omitted from the records, this is problematic.)

Two possible approaches: (1) another event, say header.csv, that provides the header fields; (2) add a header property to the records array returned by the import. I prefer (2) – simpler to code and use – but some may have ethical objections to adding non-array properties to JavaScript arrays.

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

No branches or pull requests

1 participant