-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bug: CSVParser.getData returns String and not Array #21
Comments
Oh yes,
Could you maybe provide a sample CSV, I tried one of my own with empty fields and it worked just fine. |
Great! Thank you Here is the CSV:
And here is the YARRRML: base: http://sti2.at/
prefixes:
ex: http://www.example.com/
schema: http://schema.org/
sources:
source: [trackercontrol.csv~csv]
mappings:
organization:
sources: source
s: schema:Organization/$(Tracker Name)
po:
- [a, schema:Organization]
- [schema:name, $(Tracker Name)]
trace:
sources: source
po:
- [ex:trace/destination, $(daddr)]
- [ex:trace/time, $(time)]
- [ex:trace/tracker/category, $(Tracker Category)]
- p: ex:trace/tracker/organization
o:
mapping: organization
condition:
- function: equal
parameters:
- [str1, $(Tracker Name), s]
- [str2, $(Tracker Name), o] which I parsed into the following RML using
Then I used RocketRML to produce the following RDF with
The empty nodes _:b3, _:b4, _:b5 correspond to lines with an empty string in the |
The RDF output looks as expected to me, what did you want the output to look like? Did you want the RDF to not contains b3 - b5 because they do not contain the As for the {
"foo": "",
"bar": "baz"
} {
"bar": "baz"
} while with With CSV it makes less sense than with JSON/XML: does the CSV line: It could make sense to actually treat |
Yes, exactly. Thank you for the pointers. I understand why it is not possible for CSV. Thank you for better explaining |
Hello, I noticed a bug in this line:
RocketRML/src/input-parser/CSVParser.js
Line 28 in ca8c372
It does not return an Array
Bit of context:
I'm trying to use the
ignoreEmptyStrings: true
parameter which results in an error at the above line due to this line:RocketRML/src/input-parser/helper.js
Line 301 in 450f885
However, even though I fix that bug and apply the parameter, the empty strings are not ignored and the CSV records with empty strings in them are still processed and triple is produced.
The text was updated successfully, but these errors were encountered: