Data Sources > Write API

Write API

This page covers how you can use Rockset’s API to add documents to your Rockset collections.

Add Streaming Documents

Documents can be added one at a time using Rockset API clients, as shown below.

Python
CLI
Java
Node.js
Go
from rockset import Client, Q, F
rs = Client()

# create a collection
people = rs.Collection.create("people")

# use the streaming write API
people.add_docs([{"age": 42}])

Upload a File

You can upload an entire file into a pre-existing collection using the Rockset console.

Console File Upload