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

csv-gremlin should trim whitespace in the header row #229

Open
krlawrence opened this issue Jun 30, 2022 · 0 comments
Open

csv-gremlin should trim whitespace in the header row #229

krlawrence opened this issue Jun 30, 2022 · 0 comments
Assignees
Labels
bug Something isn't working csv-gremlin

Comments

@krlawrence
Copy link
Contributor

krlawrence commented Jun 30, 2022

Given a CSV file such as

~id, ~label, type
p1, animal, cat     

The ~label header is incorrectly identified as a property key, as the space before it is not trimmed off and treated as part of the column name. CSV-Gremlin should probably be trimming off all such whitespace. Otherwise, the output winds up looking like this (below) with spaces as part of the key names.

g.addV("vertex").property(id,"p1").property(" ~label"," animal").property(" type"," cat")

The columns in the rows below the header should also be trimmed unless wrapped in quotes.

@krlawrence krlawrence added bug Something isn't working csv-gremlin labels Jun 30, 2022
@krlawrence krlawrence self-assigned this Jun 30, 2022
krlawrence added a commit that referenced this issue Jun 30, 2022
krlawrence added a commit that referenced this issue Jul 1, 2022
krlawrence added a commit that referenced this issue Jul 1, 2022
krlawrence added a commit that referenced this issue Jul 1, 2022
* Handle leading spaces correctly #229

* Bump date #229

* Make skipping spaces a command line option #229

* Update the README with skip_spaces info #229

* address reviewer feedback #229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working csv-gremlin
Projects
None yet
Development

No branches or pull requests

1 participant