See the code in ucx: https://github.com/databrickslabs/ucx/blob/125ccfa19b3f3bb3569e576b2f38ed4d62d13330/src/databricks/labs/ucx/framework/utils.py#L7. Also use it in lsql where appropriate Add it to backends or utils. Decide on what makes sense most