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

explode numerical values #68

Open
KonradHoeffner opened this issue Jan 24, 2017 · 2 comments
Open

explode numerical values #68

KonradHoeffner opened this issue Jan 24, 2017 · 2 comments

Comments

@KonradHoeffner
Copy link
Contributor

KonradHoeffner commented Jan 24, 2017

A typed literal with xsd:positiveInteger throws an exception, see below, on integer list strings like "128;207". I suggest an explode option where above string is transformed into two triples with values 128 and 207, respectively.

java.lang.NumberFormatException: For input string: "128;207"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.apache.jena.riot.process.normalize.NormalizeValue.lambda$static$3(NormalizeValue.java:131)
	at org.apache.jena.riot.process.normalize.CanonicalizeLiteral.apply(CanonicalizeLiteral.java:63)
	at org.aksw.sparqlify.core.sparql.ItemProcessorSparqlify.process(ItemProcessorSparqlify.java:141)
@Aklakan
Copy link
Member

Aklakan commented Jan 25, 2017

One common powerful approach to this is to use SQL's unnest function - which generates multiple rows from a multi-valued cell. This requires finalizing the integration of the H2 embedded database.

@KonradHoeffner
Copy link
Contributor Author

Would it work for CSV also?

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

2 participants