Help:Maintenance script "dumpRDF.php"

(Redirected from Dump rdf)
Jump to: navigation, search
Has maintenance script name::maintenance script "dumpRDF.php"
Has description::Allows to do an RDF export of existing triples
Further Information
Provided by: Has component::Semantic MediaWiki
Added: Has minimum version::2.0
Removed: Has maximum version::still in use
Location (path): Has path::./extensions/SemanticMediaWiki/maintenance/
Class docu: DumpRdf
Table of Contents

The dumpRDF.php is a maintenance script allowing to export RDF triples.

Important Notes

  • This maintenance script depreciated the former "SMW_dumpRDF.php" script starting with Semantic MediaWiki 2.0 while options and usage at that time remain the same.
NoteNote:  It is strongly encouraged to make the transition to this new script to take advantage of the new features added since and because the old one will will be removed with the release of Semantic MediaWiki 3.0 in early 2017.
  • If SMW is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set. See README in the maintenance directory.


php dumpRDF.php [--file|--categories|--classes|--concepts|--types|--individuals|--page|--properties|--d|--e]

NoteNote:  This only shows the script specific parameters.


Generic parameters

--help (-h)
Display this help message
--quiet (-q)
Whether to supress non-error output
Location of "LocalSettings.php", if not default
For specifying the wiki ID
Output globals at the end of processing for debugging
Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it
The protocol and server name to use in URLs, e.g. This is sometimes necessary because server name detection may fail in command line scripts.

Script dependant parameters

The DB user to use for this script
The password to use for this script

Script specific parameters

--file (-o) <filename>
Export into output file, stdout is used if omitted; file output is generally better and strongly recommended for large wikis.
Export only categories.
Export only concepts.
Export only concepts and categories.
Export only properties.
Export only data types.
Export only pages that are no categories, properties, or types.
--page <pagelist>
Export only pages included in the <pagelist> with | being used as a separator. Options -e, -file, -d are ignored if --page is given. Available since Semantic MediaWiki 2.1.0.CiteRef::gh:smw:620
-d <delay>
Wait for this many milliseconds after processing an article. Useful for limiting server load.
-e <each>
Retire after the given number of exported entities.


The following command exports all pages into the given file delay of 50 ms between every exported item.
php dumpRDF.php --file MyWiki.rdf -d 50
The following command exports the pages "Page 1", "Page 2" and "Page 3".
php dumpRDF.php --page "Page 1|Page 2|Page 3"


|citation text=Semantic MediaWiki: GitHub pull request #620


{{#set: |docinfo status=effective }}{{#set: |worn by =Template:Docinfo |warning =Master page updated }}{{#set:

|worn by =Template:Docinfo
|warning =No description

|revision id=47730 |namespace=Help |docinfo progress =100 |docinfo priority =2 }}{{#set:docinfo master page=Help:dumpRDF.php }}{{#set:docinfo master rev =47730 }}{{#set:docinfo category=-}}{{#set:docinfo author=User:Kghbln}}{{#set:docinfo editor=User:Kghbln}}{{#set:docinfo support=-}}{{#set:docinfo language=en}}

This documentation page applies to all SMW versions from 2.0 to the most current version.
Other versions: {{#ask: Docinfo master page::Help:dumpRDF.php Docinfo language::en from version::!2.0|
   ?from version = |
   ?to version = |
   sort = from version|
   order = desc|
   sep=, |
   limit = 3|
   searchlabel = […]
  }}       Other languages: {{#ask: Docinfo master page::Help:dumpRDF.php from version::2.0 Docinfo language::!en|
  ?Docinfo language =|
  sep=, |
  sort = Docinfo language|
  order = asc|
  limit = 10|
  searchlabel = […]

Docinfo master page::Help:dumpRDF.php Docinfo language::en from version::2.0

{{#set:Release status=current}}

{{#set:Is master page=false}}