Skip to main content

ALTER WORKER

Introduced: v1.3.0

Modifies a worker's tags, options, or state.

note

This command requires cloud control to be enabled.

Syntax

ALTER WORKER <worker_name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

ALTER WORKER <worker_name> UNSET TAG <tag_name> [ , <tag_name> ... ]

ALTER WORKER <worker_name> SET <option_name> = <option_value> [ , <option_name> = <option_value> ... ]

ALTER WORKER <worker_name> UNSET <option_name> [ , <option_name> ... ]

ALTER WORKER <worker_name> SUSPEND

ALTER WORKER <worker_name> RESUME

Parameters

FormDescription
SET TAGAdds or updates worker tags. Tag values must be string literals.
UNSET TAGRemoves one or more worker tags.
SETAdds or updates worker options. Option names are normalized to lowercase.
UNSETRemoves one or more worker options.
SUSPENDSuspends the worker.
RESUMEResumes the worker.

Examples

Set tags on a worker:

ALTER WORKER read_env
SET TAG purpose = 'sandbox', owner = 'ci';

Update worker options:

ALTER WORKER read_env
SET size = 'medium', auto_suspend = '600';

Remove a tag and an option:

ALTER WORKER read_env UNSET TAG owner;
ALTER WORKER read_env UNSET auto_suspend;

Change worker state:

ALTER WORKER read_env SUSPEND;
ALTER WORKER read_env RESUME;
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today