diff --git a/ibis/backends/duckdb/__init__.py b/ibis/backends/duckdb/__init__.py index 6341605849b7e..f23b1d118c76c 100644 --- a/ibis/backends/duckdb/__init__.py +++ b/ibis/backends/duckdb/__init__.py @@ -189,8 +189,8 @@ def create_table( initial_table = sge.Table( this=sg.to_identifier(temp_name, quoted=self.compiler.quoted), - catalog=catalog, - db=database, + catalog=sg.to_identifier(catalog, quoted=self.compiler.quoted), + db=sg.to_identifier(database, quoted=self.compiler.quoted), ) target = sge.Schema(this=initial_table, expressions=column_defs) @@ -203,8 +203,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, + catalog=sg.to_identifier(catalog, quoted=self.compiler.quoted), + db=sg.to_identifier(database, quoted=self.compiler.quoted), ) with self._safe_raw_sql(create_stmt) as cur: if query is not None: