MichaelF25 opened a new issue, #33134:
URL: https://github.com/apache/superset/issues/33134

   ### Bug description
   
   After switching from superset `4.0.2` to `4.1.2` we can not create a 
dataset, if a different dataset in a different database but with same table 
name exists already. Maybe related to #24412?
   
   We are using the official docker image from docker-hub.
   
   How to reproduce:
   
   1. Create two separate database connections pointing to different databases 
having some tables with the same name
   2. Create a dataset for some table in database `1`
   3. Create a dataset for some table with same name from step `2.` in database 
`2`
   4. => unique constraint error; was working with superset `4.0.2`
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.10
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   Output from logs:
   ```
   sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked 
autoflush; consider using a session.no_autoflush block if this flush is 
occurring prematurely)
   (sqlite3.IntegrityError) UNIQUE constraint failed: tables.table_name
   [SQL: INSERT INTO tables (uuid, created_on, changed_on, description, 
default_endpoint, is_featured, filter_select_enabled, "offset", cache_timeout, 
params, perm, schema_perm, catalog_perm, is_managed_externally, external_url, 
table_name, main_dttm_col, database_id, fetch_values_predicate, schema, 
catalog, sql, is_sqllab_view, template_params, extra, normalize_columns, 
always_filter_main_dttm, created_by_fk, changed_by_fk) VALUES (?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
   [parameters: (<memory at 0x70bba011e440>, '2025-04-15 12:56:39.082424', 
'2025-04-15 12:56:39.082428', None, None, 0, 1, 0, None, None, None, None, 
None, 0, None, 'Stat_Stock_FutureOutgoings', None, 1, None, 'gold', None, None, 
0, None, None, 0, 0, 1, 1)]
   (Background on this error at: https://sqlalche.me/e/14/gkpj)
   ```
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to