数据湖探索 DLI-创建DLI表关联HBase:语法格式

时间:2024-11-11 14:10:59

语法格式

  • 单个RowKey
    1
    2
    3
    4
    5
    6
    7
    8
    9
    CREATE TABLE [IF NOT EXISTS] TABLE_NAME (
      ATTR1 TYPE,
      ATTR2 TYPE,
      ATTR3 TYPE)
      USING [CLOUDTABLE | HBASE] OPTIONS (
      'ZKHost'='xx',
      'TableName'='TABLE_IN_HBASE',
      'RowKey'='ATTR1',
      'Cols'='ATTR2:CF1.C1, ATTR3:CF1.C2');
    
  • 组合RowKey
    1
    2
    3
    4
    5
    6
    7
    8
    9
    CREATE TABLE [IF NOT EXISTS] TABLE_NAME (
      ATTR1 String,
      ATTR2 String,
      ATTR3 TYPE)
      USING [CLOUDTABLE | HBASE] OPTIONS (
      'ZKHost'='xx',
      'TableName'='TABLE_IN_HBASE',
      'RowKey'='ATTR1:2, ATTR2:10',
      'Cols'='ATTR2:CF1.C1, ATTR3:CF1.C2'
    
support.huaweicloud.com/sqlref-spark-dli/dli_08_0119.html