数据湖探索 DLI-查看建表语句:示例

时间:2024-07-01 21:07:18

示例

Saprk 2.4.5版本示例:
  • 执行以下命令返回测试表testDB01.testTable5的建表语句

    SHOW CREATE TABLE testDB01.testTable5

  • 返回test表的建表语句:
    createtab_stmt
     CREATE TABLE `testDB01`.`testTable5`(`id` INT, `age` INT, `money` DOUBLE)
    COMMENT 'test'
    ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
    WITH SERDEPROPERTIES (
      'serialization.format' = '1'
    )
    STORED AS
      INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
      OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
    TBLPROPERTIES (
      'hive.serialization.extend.nesting.levels' = 'true',
      'ddlUpdateTime' = '1707202585460'
    )
support.huaweicloud.com/sqlreference-dli/dli_08_0091.html