Upload to Database
After the TTL file has been validated, it is time to upload it to the graph database. This can be accomplished manually using an interface like Stardog Studio for the Stardog database or using a command line / batch load process.
A batch load process makes it easy to load all the required files into the database at once. The following excerpt from a batch files shows the upload of the FileCat.ttl file to the Stardog named graph “FileCat”.
call stardog data add FileCat FileCat.ttl
In addition to the data catalog TTL file, the ontology and dictionary files should also be loaded into the graph. The validation report can also be uploaded as proof of the validation procedure.
Post Processing
SPARQL scripts for data manipulation can be run during the upload process. In this example, the batch file executes a SPARQL script to create a string value for each file that consists of a concatenation of all the terms associated with a file. This string is used for display purposes in applications.
stardog query FileCat C:\_github\NovasTaylor\FileCat\scripts\SPARQL\FileCat_InsertTermsString.rq
This is a rather silly example since applications could just as easily concatenate the terms as needed. It is provided here to show how scripts could be run for various purposes to create or update data during the load process.
NEXT: 5. Process and Code Flow