Stardog api for bulk loading

(rakesh) #1


We are currently using Database builder for Bulk data load in stardog. Below code throws an error if database is already exist. Please can you advise how we can progress even if database is already exist.

We are basically want to load bulk data on existing database. Please share your inputs on this.Thanks

val adminConnection = AdminConnectionConfiguration
.credentials(connConfig.username, connConfig.password)
.set(DatabaseOptions.NAME, “db name”)

(stephen) #2


You would simply need to use the data add capabilities of the regular Connection API, as you cannot create a database that already exists:

try (Connection c ="myDb").server("http://localhost:5820").credentials("admin", "admin").connect()) {

(zachary.whitley) #3

I you can’t bulk load into an existing database. I believe that bulk loading relies on this condition to do what it does. You can do a regular load or depending on how much data you have in there already you can dump the existing data, bulk load, and then reload the previous data.

(rakesh) #4

It is working fine. Thanks a lot for quick solution.

(system) #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.