Skip to main content
ALTER ROUTINE LOAD alters a Routine Load job that is in the PAUSED state. You can execute PAUSE ROUTINE LOAD to pause a Routine Load job. After successfully altering a Routine Load job, you can:

You can manage Routine Load jobs that run on tables only as a user who has the INSERT privilege on those tables. If you do not have the INSERT privilege, follow the instructions provided in GRANT to grant the INSERT privilege to the user that you use to connect to your cluster.

Syntax

Parameters

  • [<db_name>.]<job_name>
    • db_name: Optional. The name of the database.
    • job_name: Required. The name of the Routine Load job to be altered.
  • load_properties The properties of the source data to be loaded. The syntax is as follows:
    For detailed parameter descriptions, see CREATE ROUTINE LOAD.
  • job_properties The properties of the load job. The syntax is as follows:
    Only the following parameters can be altered:
    • desired_concurrent_number or max_concurrency
    • max_error_number or max_error_rows
    • max_batch_interval or load_interval
    • max_batch_rows or error_window_rows
    • task_consume_second or max_consume_duration
    • task_timeout_second or load_timeout
    • max_batch_size
    • jsonpaths
    • json_root
    • strip_outer_array
    • strict_mode
    • timezone
    For detailed parameter descriptions, see CREATE ROUTINE LOAD.
  • data_source and data_source_properties
    • data_source Required. The source of the data you want to load. Valid value: KAFKA.
    • data_source_properties The properties of the data source. Currently, only the following properties can be altered:
      • kafka_partitions and kafka_offsets: By default, StarRocks only supports modifying the offset of Kafka partitions that have already been consumed and does not support adding new Kafka partitions. If property.kafka_partition_discovery is set to true in the same statement, the listed partitions are validated against the Kafka topic instead, so offsets can also be specified for partitions beyond the pinned list.
      • property.*: Custom parameters for the data source Kafka, such as property.kafka_default_offsets. Note that property.kafka_partition_discovery can only be set to true, which unpins the partition list specified at job creation and re-enables automatic partition discovery. Setting it back to false is not supported; recreate the job to pin partitions again.

Examples

  1. The following example increases the value of the property desired_concurrent_number of the load job to 5 in order to increase the parallelism of load tasks.
  2. The following example alters the load job’s properties and data source information at the same time.
  3. The following example alters the filtering condition and the database partitions that data is loaded into at the same time.