数据湖探索 DLI-插入数据至DCS表:注意事项

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

注意事项

  • DLI 表必须已经存在。
  • DLI表在创建时需要指定Schema信息。
  • 如果在建表时指定“key.column”,则在Redis中会以指定字段的值作为Redis Key名称的一部分。例如:
    1
    2
    3
    4
    5
    6
    7
    8
    create table test_redis(name string, age int) using redis options(
      'host' = '192.168.4.199',
      'port' = '6379',
      'passwdauth' = '******',
      'table' = 'test_with_key_column',
      'key.column' = 'name'
    );
    insert into test_redis values("James", 35), ("Michael", 22);
    

    在redis中将会有2个名为test_with_key_column:James和test_with_key_column:Michael的表:

  • 如果在建表时没有指定“key.column”,则在Redis中的key name将会使用uuid。例如:
    1
    2
    3
    4
    5
    6
    7
    create table test_redis(name string, age int) using redis options(
      'host' = '192.168.7.238',
      'port' = '6379',
      'passwdauth' = '******',
      'table' = 'test_without_key_column'
    );
    insert into test_redis values("James", 35), ("Michael", 22);
    

    在redis中将会有2个以“test_without_key_column:uuid”命名的表:

support.huaweicloud.com/sqlreference-dli/dli_08_0227.html