POST
/
tables

Create a new Big Table, define its structure, and (optionally) populate it with data.

Row IDs for any added rows are returned in the response in the same order as the input row data is passed in the request. Row data may be passed in JSON, CSV, or TSV format.

When using a CSV or TSV request body, the name of the table must be passed as a query parameter and the schema of the table is always inferred from the content. Alternatively, the CSV/TSV content may be stashed, and then the schema and name may be passed in the regular JSON payload.

If a schema is passed in the payload, any passed row data must match that schema. If a column is not included in the passed row data, it will be empty in the added row. If a column is passed that does not exist in the schema, or with a value that does not match the column’s type, the default behavior is for the table to not be created and the API call to return an error. However, you can control this behavior with the onSchemaError query parameter.

Examples

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

name
string

Name of the table. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body.

onSchemaError
enum<string>

The action to take when the passed data does not match the table schema:

  • abort: Abort the entire operation and return an error.
  • dropColumns: Ignore the data that caused the error, and do not import those columns in the affected rows.
  • updateSchema: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.
Available options:
abort,
dropColumns,
updateSchema

Body

name
string
required

Name of the table, e.g., Invoices

rows
required

A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:

[
	{
		"fullName": "Alex Bard",
		"invoiceDate": "2024-07-29T14:04:15.561Z",
		"totalAmount": 34.50,
		"amountPaid": 0
	},
	{
		"fullName": "Alicia Hines",
		"invoiceDate": "2023-06-15T10:30:00.000Z",
		"totalAmount": 50.75,
		"amountPaid": 20
	}
]
schema
object

The schema of the table as a collection of column definitions. If this is not provided, the schema will be inferred from the data.

Response

201 - application/json
data
object
required