Quantcast

Querying SMW tables from outside mediawiki.

classic Classic list List threaded Threaded
2 messages Options
Ezo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Querying SMW tables from outside mediawiki.

Ezo
Hello,

I would like to start up a project outside of the wiki that will use the SMW data.
Now i could work with exporting to CSV & then import the data again, but i thought it would be cleaner to query the original database instead.

I know SMW uses temporary tables, so it it might not be wise to ignore the optimization from SMW. Other ideas are very welcome as well.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Querying SMW tables from outside mediawiki.

Jeroen De Dauw-2
Hey,

> Now i could work with exporting to CSV & then import the data again, but i
> thought it would be cleaner to query the original database instead.

It's a lot better to use one of SMWs interfaces rather then directly accessing the datastore used. You can use one of SMWs export formats or it's ask API [1]. Or you can use one of several extensions that provide export or synchronization features. A last option is to write some PHP that talks directly to SMWs store, but there is no good documentation on this.

[0] http://semantic-mediawiki.org/wiki/Help:Export_related_result_formats
[1] http://semantic-mediawiki.org/wiki/Ask%20API

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Loading...