Data Transfer

The Data Transfer extension is used to create pages & properties in bulk. This extension is made available through the [www.mediawiki.org/wiki/Semantic_Bundle Semantic Bundle extension package] under the GPL license and is thus free to use. This extension allows for page creation through CSV or XML import. This is the method of choice for an initial mass import of acquired & existing data into a wiki.

Changes are not immediate and may take a while for larger sets of data. Changes to MediaWiki settings can be adjusted to accommodate a higher load.

Once installed as an extension, you may use the Data Transfer extension by accessing "Special:ImportXML" or "Special:ImportCSV". A link can be found in "Special pages".

The data import is run as a job after each web page request. The number of jobs can be set by defining $wgJobRunRate in LocalSettings.php. If there is a very large number of pages that require import, set $wgJobRunRate to 0 and then, with root access to the server, run the PHP file: $IP/maintenance/runJobs.php.

Usage
The following notes were taken as a result of work performed for the Bus Stop Knowledgebase System:

Pre-processing will most likely have to be done to the CSV data. Templates (& template properties) are handled by the field name in CSV files. For example, the value/cell in the field/column name "Bus stop[Position]" would be associated with the Position parameter in the Bus stop template. Also, n-ary properties will most likely have to be handled by External Data extension.

For export from a database, because many databases do not support the '[' or ']' characters, column header names have '%_' and '_%' in place of '[' and ']', respectively. When the CSV file is cleaned up, these special characters are replaced accordingly.

'''NOTE: For pages that will include Semantic Internal Objects, the page must be created before any internal objects can be created. Multiple passes with Data Transfer may be necessary.'''

In instances of multiple templates, the template name will have to be modified (e.g., ). It proper to use the Replace Text extension in conjunction with this extension in order to change all instances of the modified template name (e.g., replace all instances of  with  ).