diff --git a/ibis/backends/clickhouse/__init__.py b/ibis/backends/clickhouse/__init__.py index d93a522c19c96..6742dd7762ed0 100644 --- a/ibis/backends/clickhouse/__init__.py +++ b/ibis/backends/clickhouse/__init__.py @@ -664,7 +664,7 @@ def create_table( schema = obj.schema() this = sge.Schema( - this=sg.table(name, db=database), + this=sg.table(name, db=database, quoted=self.compiler.quoted), expressions=[ sge.ColumnDef( this=sg.to_identifier(name, quoted=self.compiler.quoted), diff --git a/ibis/backends/duckdb/__init__.py b/ibis/backends/duckdb/__init__.py index 6341605849b7e..f9ea5e802e8c9 100644 --- a/ibis/backends/duckdb/__init__.py +++ b/ibis/backends/duckdb/__init__.py @@ -187,10 +187,8 @@ def create_table( else: temp_name = name - initial_table = sge.Table( - this=sg.to_identifier(temp_name, quoted=self.compiler.quoted), - catalog=catalog, - db=database, + initial_table = sg.table( + temp_name, catalog=catalog, db=database, quoted=self.compiler.quoted ) target = sge.Schema(this=initial_table, expressions=column_defs) @@ -201,10 +199,8 @@ def create_table( ) # This is the same table as initial_table unless overwrite == True - final_table = sge.Table( - this=sg.to_identifier(name, quoted=self.compiler.quoted), - catalog=catalog, - db=database, + final_table = sg.table( + name, catalog=catalog, db=database, quoted=self.compiler.quoted ) with self._safe_raw_sql(create_stmt) as cur: if query is not None: