8.7 基于Parquet文件创建数据集
创建于 2022-10-21 / 最近更新于 2022-10-21 / 1829
字体:
[默认]
[大]
[更大]
请求方式:POST
请求URL:$home_url/universe/public-api/dataset/create-from-parquet
请求参数
请求参数:
Name | Location | 类型 | 含义 | 必填 | 备注 |
Content-Type | Header | String | 内容类型 | 是 | application/json;charset=utf-8 |
token | Header | String | 登录用的Token | 是 | 调用登录校验API获取(8.1 登录校验) |
projectId | Body | Int | 项目ID | 是 | |
dirId | Body | Int | 文件夹ID | 否 | 不传此字段,或者值为空代表跟目录,若为空则上传到根目录 |
name | Body | String | 数据集名称 | 是 | |
filePath | Body | String | parquet文件路径 | 否 |
接口调用示例
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 人点赞过