dataset.create
Note
This document has been machine translated.
Creates a new dataset.
Parameters
- dataset_name (
string): The name of the dataset. - columns (
column_def array): Column information for the dataset. Expressed as an array ofcolumn_def. - key_columns (
string array): An array of column names that uniquely identify records. When registering a record, if a record with values in the columns specified in this item exactly match exists, it will update the existing record instead of creating a new one. This item is optional. If omitted, no column is set to uniquely identify records.
Return Value
The dataset information of the created dataset is returned.
See dataset_info for details.
Example
Request Data
{
"id": 1,
"jsonrpc": "2.0",
"method": "dataset.create",
"params": {
"dataset_name": "my_dataset",
"columns": [
{
"column_name": "id",
"data_type": "int"
},
{
"column_name": "name",
"data_type": "varchar"
},
{
"column_name": "email",
"data_type": "varchar",
"nullable": true
}
],
"key_columns": [
"id"
]
}
}
Request Execution
curl -H "Content-type: application/json" \
-H "APIKey: 9c6f4574-89d1-4e3c-8af7-2549dc217fcf" \
-H "Secret: aef8caingiej1ieNieJ3Phool4maeGohcies" \
-X POST -d "@request.json" \
https://localhost/api/v2/dataset/jsonrpc
Response
{
"result": {
"id": 3,
"session_id": null,
"username": "evwh_admin",
"ddc_type": "table",
"short_form": "my_dataset",
"long_form": "my_dataset_1752026764.296948",
"realname": "provenance.prov_b9888baddfafaf0c5aff1fa033f72118",
"created_at": {
"_type": "datetime",
"val": "2025-07-09T11:06:04.296948+09:00"
},
"committed_at": null,
"prepared_activity_id": null
},
"id": 1,
"jsonrpc": "2.0"
}