Parsed expressions can also be transformed recursively by applying a mapping function to each node in the tree: 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_...