Skip to content

TriplyDB/TriplyDBUploads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TriplyDB File Upload Examples

Reference implementations for uploading files to TriplyDB using the TUS resumable upload protocol.

Implementations

Language Directory
Java java/
Python python/

Workflow

Both implementations follow the same 4-step upload workflow:

  1. Create Job -- POST /datasets/{account}/{dataset}/jobs
  2. Upload File -- TUS protocol upload to {jobUrl}/add (5MB chunks)
  3. Start Job -- POST {jobUrl}/start
  4. Poll Status -- Exponential backoff until finished, canceled, or error

CLI Parameters

Both implementations accept the same CLI arguments:

Parameter Required Description
--file Yes Path to the file to upload
--account Yes TriplyDB account name
--dataset Yes TriplyDB dataset name
--token Yes TriplyDB API token
--api-url No API URL (default: https://api.triplydb.com)
--default-graph No Default graph name for imported triples
--overwrite-all No Overwrite all existing graphs in the dataset
--merge-graphs No Merge data into existing graphs

Quick Start

Python

cd python
./build.sh
./upload.sh --file data.ttl --account myaccount --dataset mydataset --token YOUR_TOKEN

Java

cd java
./build.sh
./upload.sh --file data.ttl --account myaccount --dataset mydataset --token YOUR_TOKEN

See Also

About

This repository describes how to use the TUS protocol in several programming languages, to upload files of arbitrary size to TriplyDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors