物理数据集表接口
查询物理数据集基础信息
接口地址:/api/v1/table
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| guid | guid | query | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | TableInfoVO |
| 404 | 未找到资源 |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| attributes | 资产属性详见响应示例 | array | AssetAttributeDTO |
| categories | 类目信息详见响应示例 | array | CategoryDTO |
| columnResponse | 字段信息详见响应示例 | array | ColumnDTO |
| description | 表描述信息 | string | |
| generateType | 数据集来源 | string | |
| gmtCreate | 数据集创建时间 | integer(int64) | integer(int64) |
| gmtModified | 数据集修改时间 | integer(int64) | integer(int64) |
| guid | 数据集guid | string | |
| name | 数据集名称 | string | |
| originalDesc | 原始描述信息 | string | |
| owner | 数据集创建者详见响应示例 | SimpleUserDTO | SimpleUserDTO |
| path | array | ||
| sourceType | 数据源类型 | string | |
| tableName | 表名 | string | |
| tags | 表打标签信息详见响应示例 | array | TagDTO |
| type | 数据集类型 | string |
响应示例:
{
"data":{
"attributes": [
{
"assetAttributeId": "",// 资产属性唯一id
"assetPath": "", //当前表的guid
"assetType": "VIEW/COLUMN", // VIEW:表资产属性,COLUMN:字段的资产属性
"content": "", //资产属性展示内容
"displayName": "", //资产属性展示名称
"type": "ENUM/RICH_TEXT/CUSTOM_TEXT" //资产属性类型 ENUM:枚举,RICH_TEXT:富文本 CUTOM_TEXT:普通文本
}
],
//表示当前表在哪个目录下面
"categories": [
{
"categoryId": "",
"categoryType": "",
"frontId": "",
"name": "",
"parentId": "",
}
],
"columnResponse": [
{
"attributes": [
{
"assetAttributeId": "",
"assetPath": "",
"assetType": "",
"content": "",
"displayName": "",
"type": ""
}
],
"column": "",
"columnDescription": "",
"columnFamily": "",
"comment": "",
"displayColumnType": "",
"isPartitioned": true,
"jsonPath": "",
"name": "",
"tagIds": [],
"tags": [
{
"tagColor": "",
"tagId": "",
"tagName": "",
"tagType": "VIEW/COLUMN" //VIEW:表的标签 COLUMN:字段标签
}
],
"type": ""
}
],
"description": "",
"generateType": "",
"gmtCreate": 0,
"gmtModified": 0,
"guid": "",
"name": "",
"originalDesc": "",
"owner": {
"userId": "",
"username": ""
},
"path": [],
"sourceType": "",
"tableName": "",
"tags": [
{
"tagColor": "",
"tagId": "",
"tagName": "",
"tagType": ""
}
],
"type": ""
},
"errorCode":"",
"errorMsg":"",
"success": true / false
}
获取数据集字段
接口地址:/api/v1/table/column
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| guid | guid | query | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | ColumnResponse |
| 404 | 未找到资源 |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| type | 字段类型 | string | |
| desc | 字段描述 | string | |
| isPartitioned | 是否为分区字段 | boolean | |
| name | 字段名称 | string | |
| precision | 字段长度 | integer(int32) | integer(int32) |
| scale | 字段精度 | integer(int32) | integer(int32) |
响应示例:
{
"data":[
{
"desc": "",
"isPartitioned": true,
"name": "",
"precision": 0,
"scale": 0,
"type": ""
}
]
}
刷新元数据
接口地址:/api/v1/table/meta/refresh
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| guid | 表guid | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 404 | 未找到资源 |
响应参数:
暂无
响应示例:
移除数据集格式(表转回文件)
接口地址:/api/v1/table/removeFormat
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| guid | guid | query | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 404 | 未找到资源 |
响应参数:
暂无
响应示例:
文件转数据集
接口地址:/api/v1/table/saveFormat
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"charset": "",
"columns": [
{
"columnDescription": "",
"columnName": "",
"columnType": "",
"originalColumnName": ""
}
],
"comment": "",
"containsHeaders": true,
"dateFormat": "",
"fileName": "",
"fileType": "",
"guid": "",
"path": "",
"quote": "",
"separator": "",
"sourceType": "",
"timestampFormat": ""
}
请求体Body参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| charset | 字符集 | false | string | ||
| columns | 字段信息详见示例 | false | array | Column | |
| comment | false | string | |||
| containsHeaders | 是否包含头(csv格式) | false | boolean | ||
| dateFormat | 日期格式 | false | string | ||
| fileName | false | string | |||
| fileType | false | string | |||
| guid | false | string | |||
| path | 文件路径 | false | string | ||
| quote | false | string | |||
| separator | false | string | |||
| sourceType | false | string | |||
| timestampFormat | false | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 404 | 未找到资源 |
响应参数:
暂无
响应示例: