Warehouse
Warehouse-related SQL commands for TiDB Cloud Lake.
General Rules
- Warehouse naming: 3–63 characters,
A-Z,a-z,0-9, and-only. - Strings and identifiers: Bare identifiers may omit quotes when they contain no spaces; otherwise enclose with single quotes. Grammar allows keywords or numeric/boolean literals as names, but runtime validation still applies.
- Numeric parameters:
nullable_unsigned_number/nullable_signed_numberaccept integers orNULL. SupplyingNULLresets the value (for example,AUTO_SUSPEND = NULLequals0). - Time parameters:
QUERY_HISTORYusesYYYY-MM-DD HH:MM:SS(UTC or explicit timezone). Missing fractional seconds are interpreted as whole seconds. - Boolean parameters: Only
TRUE/FALSEare accepted. WITHkeyword: May appear before the entire option list or ahead of each option. Options are whitespace-separated; commas are not part of the grammar.
Warehouse Management
Tags are key-value pairs that help categorize and organize warehouses, similar to AWS resource tags. They are commonly used for:
- Cost allocation: Track warehouse costs by team, project, or cost center
- Environment identification: Mark warehouses as dev, staging, or production
- Team ownership: Identify which team owns or manages a warehouse
- Custom metadata: Add any arbitrary metadata for organizational purposes
Tag keys and values are arbitrary strings (enclosed in quotes if they contain spaces or special characters). Tags can be:
- Added at warehouse creation time using
WITH TAG (key = 'value', ...) - Updated or added later using
ALTER WAREHOUSE ... SET TAG key = 'value' - Removed using
ALTER WAREHOUSE ... UNSET TAG key
Tags are returned in API responses and visible through SHOW WAREHOUSES.
Tag Limits:
- Maximum 10 tags per warehouse
- Tag name (key) maximum length: 128 characters
- Tag value maximum length: 256 characters