[14:31:55] hey everyone, I'm learning SPARQL and have a question, I'm trying to fetch a list of countries and their population from SPARQL, I'm slowly getting there (and there is an example) [14:36:20] but now I have run in to a "problem" which I'm lost at how to solve, in the returned xml, the order of the columns (?) varies, e.g. in the it seems they are returned sometimes in one order and other times in another [14:38:47] that sounds strange, but not like an insurmountable problem… can’t you look at the name= attribute of each ? [14:39:42] geman, got a WDQS link? [14:41:05] https://www.w3.org/TR/2013/REC-rdf-sparql-XMLres-20130321/#vb-results says that “Each result element … contains child elements (in no particular order) for each Query Variable”, so it sounds like this is allowed according to the spec [14:41:25] and given Blazegraph’s status, even if it wasn’t allowed, it would not be likely to get fixed soon :| [15:06:18] I want to build a wikidata-like knowledge graph for personal knowledge. Does anyone know a tool for doing this? I want to store contacts, bookmarks, questions, thoughts (everything I know) there. [15:07:21] Every thing I know would be represented as an entity, and each entity can have properties. I would create classes, properties etc., etc; pretty similar to Wikidata. [15:07:29] there are various "mind map" softwares and I keep hearing about emacs orgmode [15:08:10] doing it according to a structured schema sounds like a lot of work tho, but there's no reason you can't install wikibase yourself [15:11:08] inductiveload: Thanks! Wikibase was what I was searching for. [15:21:50] inductiveload , https://w.wiki/49TH the SPARQL query will return the results with the countryLabel first but if you don't have the ORDER BY it will be different https://w.wiki/49TP [15:22:25] and yes it's probably allowed and I shouldn't be relying on the order within XML but I'm trying to import it into a google sheet with =IMPORTXML so I don't have much control over the actual parsing process [15:22:42] unless there is some way in XPATH to tell it to sort things? [15:23:56] you mean countryLabel vs population? [15:24:07] yep [15:24:14] as in the order of the columns from left to right? [15:25:07] do you mean the order of the inside the , or the order of the inside each ? [15:25:34] order of the binding's inside the [15:26:00] not sure you can do much about that [15:26:15] can google sheets import JSON in addition to XML? then you could use the JSON result format [15:26:25] or CSV? [15:26:46] csv it can do yes, not json (not natively but with som addon but want to avoid those) [15:31:40] can I get a link to the CSV result somehow? the download is just a javascript blob? :-/ [15:34:14] with CURL I can apparently tell it to "Accept: text/csv" but Google =IMPORTDATA does not tell the server what it wants :-( [15:35:38] https://github.com/blazegraph/database/wiki/REST_API#get-or-post indicates that the format URL parameter only supports XML and JSON [15:35:43] I think for TSV/CSV you need the Accept header d( [15:35:45] * :( [15:36:24] but since you mentioned XPath – if you’re working with a particular query, maybe you could select the binding[name=countryLabel] and binding[name=population]? [15:36:31] (or whatever the XPath syntax is) [15:36:41] (I’m not very familiar with XPath and I think I slipped into CSS there ^^) [15:36:57] i.e. hardcode the names of the specific columns you’re interested in [15:40:04] (looks like it might be binding[@name='countryLabel'] in XPath) [15:40:55] I am a real noob on xpath also so seemed harder but if there is no easy way to get CSV from the API (without just telling it you want it...) [15:56:48] why oh why did they not just simply add `csv` to ?format=