元数据检索。
接口说明
元数据检索
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
POST /api/metastore/catalogs/search HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
body | object | 否 | A short description of struct | |
CatalogId | string | 否 | catalogid | 默认是空,在多catalogid下填写对应的id |
SearchText | string | 否 | 搜索问题 | tags:tag1 or comment:^iso and name=aliyun and (createTime > "20211111" and createTime < "20211117") and has category |
SortCriteria | array | 否 | 排序结构 | |
SortCriterion | 否 | 排序结构 | ||
PageSize | long | 否 | 当前查询的页大小 | 1000 |
PageNumber | long | 否 | 当前查询的页号 | 1 |
SearchType | string | 否 | 搜索类型 | TABLE/DATABASE/CATALOG |
返回参数
示例
正常返回示例
JSON
格式
{
"Code": "OK",
"Message": "\"\"",
"RequestId": "460C862F-BB91-5C04-BC3F-946EEF467862",
"Success": true,
"DatabaseResult": {
"Databases": [
{
"Database": {
"CreateTime": 1608707407,
"Description": "this is a hive database",
"LocationUri": "/hdfs/hivedb/data",
"Name": "database_test",
"OwnerName": "zhangsan",
"OwnerType": "USER",
"Parameters": {
"key": "key"
},
"Privileges": {
"GroupPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"RolePrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"UserPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
}
},
"UpdateTime": 1608707407,
"CreatedBy": "root"
},
"HighLightList": [
{
"Key": "name",
"Value": "<em>tab</em>2"
}
]
}
],
"TotalCount": 11000
},
"TableResult": {
"Tables": [
{
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"Parameters": {
"key": "key"
},
"PartitionKeys": [
{
"Comment": "comment_day",
"Name": "day",
"Parameters": {
"key": "key"
},
"Type": "int"
}
],
"Privileges": {},
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [
{
"Comment": "comment_day",
"Name": "day",
"Type": "int"
}
],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"PartitionKeys": [
{
"Comment": "comment_day",
"Name": "day",
"Type": "int"
}
],
"Privileges": {},
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"Table": {
"Cascade": false,
"CreateTime": 1608707407,
"CreatedBy": "zhangsan",
"DatabaseName": "database_test",
"LastAccessTime": 1608707407,
"LastAnalyzedTime": 1608707407,
"Owner": "zhangsan",
"OwnerType": "USER",
"PartitionKeys": [],
"Retention": 30000,
"RewriteEnabled": true,
"Sd": {
"BucketCols": [
"2010"
],
"Cols": [],
"Compressed": false,
"InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
"Location": "file:///tmp/table",
"NumBuckets": 10,
"OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat",
"Parameters": {
"key": "key"
},
"SerDeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.OpenCSVSerde"
},
"SkewedInfo": {
"SkewedColNames": [
"col1"
],
"SkewedColValueLocationMaps": {
"key": "{“col1”:\"val1\"}"
},
"SkewedColValues": [
[
"\"123\""
]
]
},
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"StoredAsSubDirectories": false
},
"TableName": "table_name",
"TableType": "MANAGED_TABLE",
"Temporary": false,
"UpdateTime": 1608707407,
"ViewExpandedText": "''",
"ViewOriginalText": "''",
"TableId": "59c6c8fefeaa46d8b599c1f790c59a19",
"TableVersion": {
"VersionId": 5
}
},
"VersionId": 5
}
},
"VersionId": 5
}
},
"HighLightList": [
{
"Key": "name",
"Value": "<em>tab</em>2"
}
]
}
],
"TotalCount": 1100
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史