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

Upload.insertRows

Upload.insertRows(rows) → Promise<object>

Inserts rows into an upload of type stream. Rows are objects keyed by variable name; values may be JavaScript primitives, BigInts, Dates, or Temporal values.

const upload = await table.upload('my_stream').create({
  type: 'stream',
  schema: [
    { name: 'id', type: 'integer' },
    { name: 'observed_at', type: 'dateTime' },
  ],
  ifNotExists: true,
});
await upload.insertRows([{ id: 1, observed_at: '2020-01-01T00:00:00.123' }]);

Parameters:

rows : object[] The rows to insert.

Returns: Promise<object>, the API's response.

Was this helpful?