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:
desired_concurrent_number
max_error_number
max_batch_interval
max_batch_rows
max_batch_size
jsonpaths
json_root
strip_outer_array
strict_mode
timezone
-
data_source
Data source type. Currently support:
KAFKA
-
data_source_properties
Related properties of the data source. Currently only support:
kafka_partitions
kafka_offsets
- Customize property, such as
property.group.id
Note:
kafka_partitions
andkafka_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
-
Modify
desired_concurrent_number
as 1ALTER ROUTINE LOAD FOR db1.label1 PROPERTIES ( "desired_concurrent_number" = "1" );
-
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.