Skip to content

Commit 211cbfc

Browse files
committed
add missing quote to alias
1 parent 5366da2 commit 211cbfc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dlt/destinations/dataset/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ def normalize_query(
146146
if node.db != expanded_path[0]:
147147
node.set("catalog", sqlglot.to_identifier(expanded_path[0], quoted=False))
148148
if isinstance(node, sge.Alias):
149-
node.set("alias", naming.normalize_identifier(node.alias))
149+
node.set(
150+
"alias", sqlglot.to_identifier(naming.normalize_identifier(node.alias), quoted=True)
151+
)
150152
# quote and case-fold identifiers, TODO: maybe we could be more intelligent, but then we need to unquote ibis
151153
if isinstance(node, sge.Identifier):
152154
if is_casefolding:

0 commit comments

Comments
 (0)