<docbook><section><title>VirtBulkRDFLoaderExampleMultiple</title><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Example for Multiple RDF Source Files Upload</bridgehead>
<para>The following example demonstrates how to upload multiple RDF source files using the Bulk Loading Sequence.</para>
<orderedlist spacing="compact"><listitem>Assuming there is a folder with name &quot;tmp&quot; in your FS and it is under a directory specified in the <emphasis><ulink url="http://docs.openlinksw.com/virtuoso/databaseadmsrv.html#fp_acliniallowed">DirsAllowed</ulink></emphasis> param defined in your virtuoso ini file.
</listitem>
<listitem>Also assume in the folder &quot;tmp&quot; you have the files: &quot;file1.n3&quot; and &quot;file2.n3&quot;, that contain: <programlisting>-- file1.n3
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://rdfs.org/sioc/ns#User&gt; .
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://rdfs.org/sioc/ns#name&gt; 	&quot;Kingsley Uyi Idehen&quot; .
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://rdfs.org/sioc/ns#has_function&gt; 	&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/briefcase/My%20Web%20Drive#owner&gt; .


--file2.n3
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://rdfs.org/sioc/ns#id&gt;  	&quot;kidehen@openlinksw.com&quot; .
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://rdfs.org/sioc/ns#link&gt; 	&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com&gt; .
&lt;http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this&gt; &lt;http://rdfs.org/sioc/ns#account_of&gt; 	&lt;http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this&gt; .
</programlisting></listitem>
<listitem>Make sure the <ulink url="VirtBulkRDFLoaderScript">Bulk Loading script</ulink> is executed.
</listitem>
<listitem>Register the files file1.n3 and file2.n3 with graph IRI the triples to go to &quot;<ulink url="http://kidehendata.com">http://kidehendata.com</ulink>#&quot;: <programlisting>SQL&gt;ld_dir (&#39;tmp&#39;, &#39;*.n3&#39;, &#39;http://kidehendata.com#&#39;);
Done. -- 90 msec.
</programlisting><orderedlist spacing="compact"><listitem>Note that if there are other *.n3 files in your folder (tmp), then their content also will go to the location specified by the above graph.
</listitem>
<listitem>Also is recommended files with *.
 ext.graph to be deleted from the tmp folder.
</listitem>
</orderedlist></listitem>
<listitem>Create in the &quot;tmp&quot; folder an empty file with name: <emphasis>global.graph</emphasis> </listitem>
<listitem>Edit the <emphasis>global.graph</emphasis> by adding the graph URI, so the content of the file to be: <programlisting>http://kidehendata.com#
</programlisting></listitem>
<listitem>Finally execute: <programlisting>SQL&gt;rdf_loader_run ();
Done. -- 100 msec.
</programlisting></listitem>
<listitem>As result in the Virtuoso log should be notification of the loading having completed: <programlisting>10:21:50 PL LOG: Loader started
10:21:50 PL LOG: No more files to load. Loader has finished
</programlisting></listitem>
<listitem>To check the inserted triples for the given graph, execute: <programlisting>SQL&gt;SPARQL
SELECT * 
FROM &lt;http://kidehendata.com#&gt;
WHERE 
  {
    ?s ?p ?o
  }
;
s                                                                p                                                 o
VARCHAR                                                          VARCHAR                                           VARCHAR
_______________________________________________________________________________
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://www.w3.org/1999/02/22-rdf-syntax-ns#type   http://rdfs.org/sioc/ns#User
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://rdfs.org/sioc/ns#name                      Kingsley Uyi Idehen
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://rdfs.org/sioc/ns#has_function              http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/briefcase/My%20Web%20Drive#owner
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://rdfs.org/sioc/ns#id                        kidehen@openlinksw.com
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://rdfs.org/sioc/ns#link                      http://www.openlinksw.com/dataspace/kidehen@openlinksw.com
http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this  http://rdfs.org/sioc/ns#account_of                http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this

6 Rows. -- 20 msec.
</programlisting></listitem>
</orderedlist></section></docbook>