-
Notifications
You must be signed in to change notification settings - Fork 9
Configuring Databases
VLog supports loading facts from several databases at the same time. It also supports several database technologies. This section explains how a database source can be configured.
Vlog will load the configuration of all used data sources from a given file with .conf extension. Each data source will be associated to an EDB predicate. The .conf file configures these predicates trough properties dedicated to each such EDB. A list of n datasources will be configured by assigning n sets of properties values, each set of property names identifying its EDB by its prefix. For example, a .conf that configures two EDB predicates P and Q will contain the following lines:
EDB0_predname=P
EDB1_predname=Q
VLog supports file datasources of type .csv, as well as the RDF format N-Triples (.nt). Files can also be zipped, with .gzip extension. The facts from given file will be dictionary-encoded and stored in memory. Each such file i must be configured using the following setting:
EDB[i]_predname=[predicate_name]
EDB[i]_type=INMEMORY
EDB[i]_param0=[path_to_file_parent_dir]
EDB[i]_param1=[file_name_without_extension]
To initialise a Trident database from a N-Triples format file, one must run the following command:
./vlog load -i [path_to_N-Triples_file] -o [path_to_new_database_dir]
After the computation is terminated, VLog has created a new folder at given a copy of the database at given [path_to_new_database_dir] location, where the content of the database containing facts from [path_to_N-Triples_file] has been exported.
.conf file content, for a Trident database:
EDB0_predname=[predicate_name]
EDB0_type=Trident
EDB0_param0=[path_to_trident_database]