Universe 帮助中心

8.7 基于Parquet文件创建数据集

创建于 2022-10-21 / 最近更新于 2022-10-21 / 1280
字体: [默认] [大] [更大]

请求方式:POST

请求URL:$home_url/universe/public-api/dataset/create-from-parquet

请求参数

请求参数:

NameLocation类型含义必填备注
Content-TypeHeaderString内容类型application/json;charset=utf-8
tokenHeaderString登录用的Token调用登录校验API获取(8.1 登录校验
projectIdBodyInt项目ID


dirIdBodyInt文件夹ID

不传此字段,或者值为空代表跟目录,若为空则上传到根目录

nameBodyString数据集名称
filePathBodyStringparquet文件路径


接口调用示例

Header 示例

{
   "Content-Type": "application/json; charset=utf-8",
   "token": "ab7f1665-8dfc-4d8f-928d-c7a5aefc9332" //登录接口获得的Token
}

Body

{
   "projectId":1,
   "dirId":1,
   "name": "upload-from-parquet",
   "filePath": "s3a://bucket/dataset-delta/22/output/task_result_data_parquet"
}

Response

{
   "code": 0,
   "msg": "success",
   "data": {
       "id": 27,
       "name": "upload-from-parquet",
       "userId": 2,
       "userName": null,
       "updateUserId": null,
       "updateUserName": null,
       "projectId": 1,
       "rowCount": 256,
       "colCount": 2,
       "createTime": null,
       "updateTime": null,
       "description": null,
       "dirId": 1,
       "status": "FINISHED",
       "version": 0,
       "dataVersion": 0,
       "fields": null,
       "projectName": null,
       "externalDataPath": null,
       "dirPath": null,
       "primaryKeys": null,
       "partitionKeys": null,
       "sourceType": null,
       "datasetCenterRelationType": null,
       "aiDatasetType": null,
       "message": null,
       "del": false,
       "fullDataPath": "s3a://bucket/dataset-delta/27/output/task_result_data_parquet",
       "format": "delta"
   },
   "errorDetail": null
}
{
   "code": 110013,
   "msg": "Dataset with the same name already exists. Please choose a different one.",
   "data": null,
   "errorDetail": null
}
0 人点赞过