[ 
https://issues.apache.org/jira/browse/ANY23-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442438#comment-13442438
 ] 

Kai Eckert commented on ANY23-116:
----------------------------------

I think, I found the problem in 
org/apache/any23/extractor/csv/CSVExtractor.java:

246  if (cell.equals("")) {
247     continue;
248     }
249     URI predicate = headerURIs[index];
250     Value object = getObjectFromCell(cell);
251     out.writeTriple(rowSubject, predicate, object);
252     index++;

When a cell is skipped in line 246, the index has to be incremented as well, 
otherwise the next value gets the wrong predicate.
                
> Empty values are skipped when reading tab separated CSV.
> --------------------------------------------------------
>
>                 Key: ANY23-116
>                 URL: https://issues.apache.org/jira/browse/ANY23-116
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.7.0
>         Environment: Linux
>            Reporter: Kai Eckert
>              Labels: CSV
>
> I have a tab separated CSV file without text delimiters, like this:
> val1\tval2\tval3
> When values are missing, this looks like this:
> val1\t\tval3
> The missing val2 is skipped and instead, val3 ist added to the RDF as value 
> for property2.
> EDIT: The same is true for a comma separated file with string delimiters, like
> "val1",,"val3"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to