π Bug β: Variable name collision for SQL cells using same table name in different schemas #9734
-
DescriptionWhen using multiple SQL cells in marimo with DuckDB, creating tables with the same name in different schemas leads to a variable redefinition error. Although the tables are fully qualified and valid in DuckDB, marimo raises an error due to internal variable name collisions. Minimal Reproducible Example-- Cell 1
CREATE TABLE finance.datalake.xx (id INT);-- Cell 2
CREATE TABLE finance.information_layer.xx (id INT);ERRORExpected BehaviorSince the tables are created in different schemas, both statements should execute without conflict: EnvironmentThat is my opinion. What is the marimo way, to handle this? Best |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
My personal workarround: -- SQL Cell 1
CREATE TABLE finance.datalake.xx (id INT);-- SQL Cell 2
CREATE TABLE finance.information_layer.xx_fix (id INT);Use duckdb conn in a python cell, so i can have same named tables in a different schemas. conn.sql("""
CREATE OR REPLACE TABLE finance.information_layer.xx(ID INT);
""") |
Beta Was this translation helpful? Give feedback.
-
|
This looks like a bug with our sql ast parsing. Thanks for reporting. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Light2Dark , thanks for the answer. How do you proceed here? Closing this thread and opening an issue instead? |
Beta Was this translation helpful? Give feedback.
It's been fixed. #9744, will be out in the next release.
I'll close this discussion, thank you!