Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Uploading data

Create a new dataset

import redivis from 'redivis';

// Could also create a dataset under an organization:
// const dataset = redivis.organization('my_organization').dataset('some_dataset');
const dataset = redivis.user('your_username').dataset('some_dataset');

// publicAccessLevel can be one of 'none', 'overview', 'metadata', 'sample', 'data'
await dataset.create({ publicAccessLevel: 'overview' });

Create a table and upload data

import redivis from 'redivis';

const dataset = redivis.user('user_name').dataset('dataset_name', { version: 'next' });

// Create a table on the dataset. Datasets may have multiple tables
const table = await dataset.table('table_name').create({ description: 'Some description' });

// Upload a file to the table.
// You can create multiple uploads per table, in which case they'll be appended together.
await table.upload().create(
  './data.csv', // A file path (in Node.js), Blob, File, ArrayBuffer, ReadableStream, rows, or arrow Table
  {
    type: 'delimited', // Inferred from the file name if not provided
    removeOnFail: true, // Remove the upload if a failure occurs
    waitForFinish: true, // Wait for the upload to finish processing
    raiseOnFail: true, // Throw an error on failure
  },
);

Upload data from the browser

Upload rows

Upload non-tabular files

Upload data from an external source

Stream data to an upload

Release a new version

Create a subsequent version on an existing dataset

Was this helpful?