Tables (upload data)
Insert Data (beta)
Insert the data in a file into a table.
POST
/
v1
/
table
/
{namespace}
/
{table_name}
/
insert
This endpoint is currently in beta, and may change without warning.
To be able to insert into a table, it must have been created with the /create endpoint.
- The data in the files must conform to the schema, and must use the same column names as the schema.
- One successful
/insert
request consumes 10 credits.
Supported filetypes
CSV files (Content-Type: text/csv
)
CSV files must use a comma as delimiter, and the column names in the header must match the column names of the table.
JSON files (Content-Type: application/x-ndjson
)
These are files where each line is a complete JSON object which creates one table row. Each line must have keys that match the column names of the table.
Authorizations
x-dune-api-key
string
headerrequiredThe API key of your team or user.
Path Parameters
namespace
string
requiredThe namespace of the table to insert into (e.g. my_user
).
table_name
string
requiredThe name of the table to insert into (e.g. interest_rates
).
Body
The body is of type file
.
Response
200 - application/json
rows_written
number
The number of rows that were written to the table.
Was this page helpful?