How to add data to Stardog from Azure Blob storage

Created by Steve Place, Modified on Wed, 13 Sep 2023 at 12:50 PM by Steve Place

Unlike with Amazon S3, it is currently not possible to load data to Stardog directly from Azure Blob storage. However, Azure Blob storage has a REST API you can query, and you can chain a call to that to a call to Stardog's REST API to add your data.


First, make sure your data is stored in a data format that Stardog supports. You can find the list of supported formats here.


Next, run the following command:

curl -H "Authorization: Bearer <Azure Blob Storage Token>" "<Azure Blob URL>" | \
curl -u username:password -X POST \
-H "Content-Type: text/turtle" \
-H "Content-Encoding: gzip" \
--data-binary @- http://localhost:5820/myDatabase?graph=urn:graph
  1. The first curl command fetches the data from Azure Blob Storage. Replace <Azure Blob Storage Token> and <Azure Blob URL> with your actual Azure token and URL.
  2. The output from the first curl is piped into the second curl command using the | symbol.
  3. --data-binary @-: The @- tells curl to read data from stdin (which is being piped in from the first curl command).
  4. This command assumes your data is stored in Azure as turtle compressed with GZIP. Remove the "Content-Encoding" line if your data is not compressed, and modify the "Content-Type" line if your data is not in the turtle format.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article