获取数据表的DDL-GetCatalogTableDDL

获取用户指定名称的数据表的创建DDL

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID,不填则为默认项目No
DatabaseNamestring数据库名称Yes
TableNamestring数据表名称Yes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
RequeststringAPI请求IDNo
DatabaseNamestring数据库名称No
TableNamestring数据表名称No
TableDDLstring数据表结构定义DDLNo

Request Example

https://api.ucloud.cn/?Action=GetCatalogTableDDL
&Region=xxx
&ProjectId=lCYjZaCF
&DatabaseName=default
&TableName=tbl4

Response Example

{
    "RetCode": 0,
    "Action": "GetCatalogTableDDLResponse",
    "Request": "20d3da96-0edd-4429-ba5d-1c5901d6c88b",
    "DatabaseName": "default",
    "TableName": "tbl4",
    "TableDDL": "CREATE EXTERNAL TABLE `tbl4`(\n`id` string)\nSTORED AS INPUTFORMAT\n'org.apache.hadoop.mapred.TextInputFormat'\nOUTPUTFORMAT\n'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION\n'ufile://usql/tpc/tpch-s1/nation'\nTBLPROPERTIES (\n'skip.header.line.count'='1',\n'totalSize'='0',\n'delimiter'='|',\n'numFiles'='0',\n'transient_lastDdlTime'='1534840384',\n'classification'='csv')"
}