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

时间:2024-11-11 14:11:00

语法格式

  • 指定Key
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    CREATE TABLE [IF NOT EXISTS] TABLE_NAME(
        FIELDNAME1 FIELDTYPE1,
        FIELDNAME2 FIELDTYPE2)
      USING REDIS OPTIONS (
      'host'='xx',
      'port'='xx',
      'passwdauth' = 'xxx',
      'encryption' = 'true',
      'table'='namespace_in_redis:key_in_redis',
      'key.column'= 'FIELDNAME1'
    );
    
  • 通配key
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    CREATE TABLE [IF NOT EXISTS] TABLE_NAME(
        FIELDNAME1 FIELDTYPE1,
        FIELDNAME2 FIELDTYPE2)
      USING REDIS OPTIONS (
      'host'='xx',
      'port'='xx',
      'passwdauth' = 'xxx',
      'encryption' = 'true',
      'keys.pattern'='key*:*',
      'key.column'= 'FIELDNAME1'
    );
    
support.huaweicloud.com/sqlref-spark-dli/dli_08_0226.html