There is also a way to recursively transform the parsed tree by applying a mapping function to each tree node:from sqlglot import exp, parse_one expression_tree = parse_one("SELECT a FROM x") def transformer(node): if isinstance(node, exp.Column) and node.name == "a": return parse_...