The upload options
Optional Readonlyclear?: booleanWhether to overwrite the target graph, removing its existing statements before the upload;
defaults to false, adding the uploaded statements to the ones the target graph already holds
Optional Readonlybatch?: booleanWhether to store each graph as it arrives, trading atomicity for bounded memory use;
defaults to false, storing the whole feed in a single repository transaction
Optional Readonlyrepository?: RepositoryThe target repository; defaults to the createRepository service
Optional Readonlycontext?: stringThe target named graph; defaults to the default graph
A sink storing each graph in the feed into the target graph and resolving to the number of stored statements
Error If options.repository is omitted, and either no execution is running or the running
one binds no repository to createRepository, as service defines
Error While the feed is consumed, whatever the source reports while producing graphs, or whatever the repository reports while storing them
Creates a sink storing a feed of RDF graphs into a SPARQL repository.
The sink adds the statements of every graph to the target graph, then resolves to the total number of statements it stored. With
clearset, the target graph is emptied first, so that after the upload it holds exactly the statements in the feed; an empty feed then leaves the target graph empty rather than untouched.By default the upload is atomic: the sink collects the whole feed in memory, then stores it, clearing included, in a single repository transaction. On repositories supporting transactions, a failure leaves the target graph as it was before the upload; the transaction stays open only while statements are written, however slowly the feed is produced.
With
batchset, the sink stores each graph as soon as it arrives, in its own request and outside any transaction. Memory use stays bounded on feeds of any length, but a failure leaves the graphs stored so far in place, and an overwriting upload may leave the target graph cleared or only partially loaded.