yggdrasil.databricks.warehouse.wh_utils¶
wh_utils ¶
next_indexed_name ¶
Return name with its trailing [int] suffix incremented.
"wh" -> "wh [2]"
"wh [2]" -> "wh [3]"
"wh [10]" -> "wh [11]"
"wh [2] " -> "wh [3]" (whitespace tolerated)
"" -> " [2]" (degenerate; caller should guard)
indexed_name_parts ¶
Split name into (base, index).
Unsuffixed names return index 1 (the implicit "first" warehouse).
"wh" -> ("wh", 1)
"wh [2]" -> ("wh", 2)
"wh [10]" -> ("wh", 10)
name_at_index ¶
Return name rewritten with [index] suffix (or no suffix if index==1).
serverless_sibling_spec ¶
Build a create_warehouse kwargs dict for a serverless sibling.
Clones the editable subset of details (filtered through
:data:_EDIT_ARG_NAMES), forces enable_serverless_compute=True
for fast cold-start, and assigns name — defaulting to the next
[idx]-suffixed sibling of details.name.