LOAD
The SPARQL LOAD statement is used to load data to AnzoGraph from files that are in Turtle, N-Triple, N-Quad, or TriG format.
For information about load file directory requirements and load architecture, see Load File Requirements. For more information on the data types thatAnzoGraph uses to store loaded or inserted data, see AnzoGraph Data Type Handling. Also see Loading Data from Files for specific examples and guidance for using the LOAD command on different deployment platforms.
LOAD Syntax
Run the following statement to load data from Turtle, N-Triple, N-Quad, or TriG files.
LOAD [ WITH 'leader' | 'compute' | 'global' ] <URL> [ INTO GRAPH <graph_name> ]
Option | Description |
---|---|
WITH 'leader' | Include this optional clause when loading files that only the leader server can access. WITH 'leader' is the default value for the LOAD statement. When the WITH clause is omitted, the load proceeds as if WITH 'leader' was specified.
Note: The "leader" keyword is case-sensitive. Type the term using lower case letters. |
WITH 'compute' | Include this optional clause when all servers will load files from their local file systems. Use this option if you have arranged the load files so that each AnzoGraph server has a unique subset of files on its local file system. Note: The "compute" keyword is case-sensitive. Type the term using lower case letters. |
WITH 'global' | Include this optional clause when all servers will load a subset of files from directories on a mounted file system. Include this option when every AnzoGraph server in the cluster has visibility to the entire data set. AnzoGraph automatically divides file selection among the servers. Note: The "global" keyword is case-sensitive. Type the term using lower case letters. |
<URL> | Required clause to specify the URL for the server and directory or file that you want to load. When you specify a directory, AnzoGraph loads all valid files in that directory. For example, this URL loads a single file from the local filesystem: <file:/home/user/data/tickit.ttl> This example URL loads a directory of .ttl.gz files on a mounted file system: <dir:/global/nfs/vpc_nfs_server/data/tickit_all.ttl.gz> Important: When specifying |
INTO GRAPH <graph_name> | When loading files such as Turtle or N-Triple files without graph specifications, include this optional clause to specify the graph to load data into. If the graph does not exist, the system automatically creates it and then loads the data into it. If you do not specify a graph, AnzoGraph loads data into the default graph. You can also include the INTO GRAPH option when loading N-Quad files. If the N-Quad files contain a mixture of quads and triples, AnzoGraph loads the triples into the specified graph. Quads are still loaded according to their graph specification. If you omit this option for N-Quad files, any triples without graph specifications are loaded into the default graph. |