- Loading Your Data
- Data Sources
- Write API
This page covers how you can use a self-managed data source by adding documents to your Rockset collections manually using the Write API.
#What is the Write API?
The Write API refers to the subset of APIs in the Rockset API which are used to insert, update, upsert, or delete documents in a Rockset collection.
You should use this option if either Rockset does not support managed integrations with your desired data source, or if you do not want Rockset to automatically sync your data and wish to manage syncing on your own.
Note that if you choose not to use a managed integration, you will have to manage data syncing on your own, whereas Rockset would automatically sync your data when using a managed integration such as S3 or DynamoDB.
#Create an Empty Collection
While you can directly add documents to any existing collection, you will need to first create an empty collection if you intend to use the Rockset API to add documents to a new collection.
You can create an empty collection by navigating to Collections > Create Collection > Write API in the Rockset Console.
For your convenience, Rockset also maintains SDKs for Node.js, Python, Java, and Go. Each SDK has its own set of methods for using the REST API to add documents which you can find in its documentation.
#Upload a File
To manually create a collection using a file as your data source, you can do so from the Rockset Console by navigating to Collections > Create Collection > File Upload. You can also upload files to any existing collections (or to this one after it has been created). The file formats currently supported include JSON, CSV, XML, Parquet, XLS and PDF.