Create Table
Create a new Dune table with the specified name and namespace.
The resulting table will be empty, and can be inserted into with the /insert endpoint.
- If a table already exists with the same name, the request will fail.
- Column names in the table can’t start with a special character or a digit.
- Each successful table creation consumes 10 credits.
- To delete a table, you can go to
user settings (dune.com) -> data -> delete
or use the /delete endpoint.
Schema
You need to define the schema of your data by providing schema
array of columns in the request. Each column has three parameters:
name: the name of the field
type: the data type of the field
nullable: if the column is nullable (true/false, true by default)
Authorizations
The API key of your team or user.
Body
The name of the table to create. Must begin with a lowercase letter and contain only lowercase letters, digits, and underscores.
"my_data"
An ordered list of columns that define the table schema. Cannot be empty.
A column of the table.
The namespace of the table to create. Only the name of your associated API key is allowed at the moment, i.e. either my_user
or my_team
. (Optional. Default is the namespace of your API key.)
"my_user"
If true, the table will be private. If private it is only visible to the team or user that your API key is associated with.
A description of the table.
Response
The namespace of the table.
"my_user"
The name of the table.
"my_data"
The full name of the table, as it should be referred to in a query.
"dune.my_user.my_data"
An example query to use on Dune querying your new table.
"select * from dune.my_user.my_data"
Whether the request already existed.
false
A message explaining whether the table was created in this request or not. The same information is encoded in already_existed
.
"Table created successfully"
Was this page helpful?