Skip to content

Commit 234230a

Browse files
committed
fix(databricks-jdbc-driver): Escape quotes in column names
1 parent f7e8fa1 commit 234230a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ export class DatabricksQuery extends BaseQuery {
141141
}
142142

143143
public escapeColumnName(name: string) {
144-
return `\`${name}\``;
144+
// Use ` to escape ` itself.
145+
// https://docs.databricks.com/en/sql/language-manual/sql-ref-identifiers.html
146+
return `\`${name.replaceAll('`', '``')}\``;
145147
}
146148

147149
public getFieldIndex(id: string) {

0 commit comments

Comments
 (0)