Baidu AI Cloud
中国站

百度智能云

Data Warehouse

ALTER-ROUTINE-LOAD

ALTER ROUTINE LOAD

Description

This syntax is used to modify the routine load jobs that have been created.

Only jobs in PAUSED state can be modified.

ALTER ROUTINE LOAD FOR [db.]job_name
[job_properties]
FROM data_source
[data_source_properties]
  • [db.]job_name

    Specify the job name to be modified.

  • tbl_name

    Specify the name of the table to be loaded.

  • job_properties

    Specify the job parameters to be modified. Currently only the following parameters can be modified:

    1. desired_concurrent_number
    2. max_error_number
    3. max_batch_interval
    4. max_batch_rows
    5. max_batch_size
    6. jsonpaths
    7. json_root
    8. strip_outer_array
    9. strict_mode
    10. timezone
  • data_source

    Data source type. Currently support:

    KAFKA

  • data_source_properties

    Related properties of the data source. Currently only support:

    1. kafka_partitions
    2. kafka_offsets
    3. Customize property, such as property.group.id

    Note:

    1. kafka_partitions and kafka_offsets are used to modify the offset of kafka partition to be consumed, only the partition that has already consumed can be modified. It is allowed to add new partition.

Example

  1. Modify desired_concurrent_number as 1

    ALTER ROUTINE LOAD FOR db1.label1
    PROPERTIES
    (
        "desired_concurrent_number" = "1"
    );
  2. Modify desired_concurrent_number as 10, modify the offset of partition, modify group id.

    ALTER ROUTINE LOAD FOR db1.label1
    PROPERTIES
    (
        "desired_concurrent_number" = "10"
    )
    FROM kafka
    (
        "kafka_partitions" = "0, 1, 2",
        "kafka_offsets" = "100, 200, 100",
        "property.group.id" = "new_group"
    );

Keywords

ALTER, ROUTINE, LOAD

Best Practices

This command can be used to correct the offset of consumption, or modify the mapping, transformation and filtering rules of columns after the Kafka data format is changed.

Previous
CANCEL-LOAD
Next
STOP-ROUTINE-LOAD