Skip to content

SemanticindexLubmData

Guohui Xiao edited this page Sep 18, 2013 · 2 revisions

Table of Contents

Data Import into OBDA system

Important note for ISWC reviewers : The data that follows is related to on-going experimentation over LUBM data that was NOT reported in the ISWC submission. Please ignore this data for your evaluation.

Data Generation

This will produce files with naming schema - Unvirsityi_j.owl where i and j are indexes.
  • Gather all ABox files and LUBM TBox file under the name "univ-bench.owl" in one directory.
  • Set the classes LUBMTester static variable dataDir to point to this directory (you may use relative paths, relative to the execution directory).

Data dumping

Before data can be imported into the relation database the owl documents need to be processed by the CSVDumper class. The result of this processing are two files classes.csv and rolles.csv located in previously specified dataDir directory.

Data Loading

  • Setup your relation database (create a database and a user that owns this database).
Update the classes CSVLoader settings accordingly (set url, username and password to match yours).
  • Update your pg_hba.conf to allow connection from your current computer.
If you use a local database pg_hba.conf should contain a line: local all all md5

Data import is started as a separate process using the /COPY command http://www.postgresql.org/docs/8.3/interactive/sql-copy.html and **can not** rely on password input from obda system. Because of that user should have a file in his home directory called .pgpass that contains authentication information for the database he wished to use. More about .pgpass http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html

Also note, data import assumes existence of psql file in the directory /usr/bin/

LUBMTester.dumpData

After all these requirements have been met. You may start data import by running the LUMBTester.dumpData method. This method is not responsible for Data Generation phase, it assumes ABox data has already been generated and the variable dataDir points to the directory with these files. This method will first transform all owl file into csv and then import them into postgres db.

Clone this wiki locally