数据湖探索 DLI-DWS输出流(通过OBS转储方式):示例

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

示例

  • CS V格式转储。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    CREATE SINK STREAM car_infos (
      car_id STRING,
      car_owner STRING,
      car_brand STRING,
      car_price INT,
      car_timestamp LONG
    )
      WITH (
        type = "dws",
        region = "xxx",
        ak = "",
        sk = "",
        encode = "csv",
        field_delimiter = "\u0006\u0006\u0002",
        quote = "\u0007",
        obs_dir = "dli-append-2/dws",
        username = "",
        password =  "",
        db_url = "192.168.1.12:8000/test1",
        table_name = "table1",
        max_record_num_per_file = "100",
        dump_interval = "10"
      );
    
  • ORC格式转储。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    CREATE SINK STREAM car_infos (
      car_id STRING,
      car_owner STRING,
      car_brand STRING,
      car_price INT,
      car_timestamp LONG
    )
      WITH (
        type = "dws",
        region = "xxx",
        ak = "",
        sk = "",
        encode = "orc",
        db_obs_server = "obs_server",
        obs_dir = "dli-append-2/dws",
        username = "",
        password =  "",
        db_url = "192.168.1.12:8000/test1",
        table_name = "table1",
        max_record_num_per_file = "100",
        dump_interval = "10"
      );
    
support.huaweicloud.com/sqlreference-dli/dli_08_0248.html