xavier-GitHub76 commented on issue #35030:
URL: https://github.com/apache/superset/issues/35030#issuecomment-3646490755

   I ran further tests by analyzing the contents of the tables.
   
   Creating a dataset and a chart --> Everything is OK, the chart displays the 
correct value (count = 96)
   
   Changing the source to point to another database (containing a table with 
the same name and structure but with only one row): Everything is OK, the chart 
displays the correct value (count = 1)
   
   <img width="1282" height="860" alt="Image" 
src="https://github.com/user-attachments/assets/9ae10f52-e6df-4d38-96fc-a6a7ed21204d";
 />
   
   Comparing database data:
   
   For each table, I executed the following queries:
   
   SELECT
   id, perm, schema_perm, datasource_id, catalog_perm
   FROM public.slices
   where id = 252
   
   SELECT
   id, database_id, table_name, schema_perm, catalog, catalog_perm
   FROM public.tables
   where id = 106
   
   <img width="1455" height="326" alt="Image" 
src="https://github.com/user-attachments/assets/739e5d84-ab2b-4c9f-a860-64d50d58fd7d";
 />
   
   We can see that the data is consistent, the connections used have been 
correctly swapped, and the databases used are indeed different ("Formation" has 
correctly replaced "démo" and the database_id is different).
   
   By iterating again (i.e., reusing the connection to the demo database), the 
diagram can no longer be displayed.
   
   <img width="1657" height="551" alt="Image" 
src="https://github.com/user-attachments/assets/1bccff93-9ceb-4850-ad20-b0804be64d3f";
 />
   
   A new comparison in the database highlights the confusion:
   
   <img width="1787" height="356" alt="Image" 
src="https://github.com/user-attachments/assets/2ceab9d1-6a46-4fec-8c26-9e9034b5bc12";
 />
   
   The database_id has indeed reverted to its initial value, but
   
   for slice objects (graphs) or tables (datasets), the "schema_perm" and 
"catalog_perm" fields correctly indicate:
   
   - the use of the connection "[EcoSQL - demo (Conso Gaz Elec)]"
   
   - but a database name of "formation". The database should be demo.
   
   Another inconsistency: only for the "tables" object, the catalog field is 
"formation", it should be demo.
   
   I tried directly correcting the database information using the following 
queries:
   
   UPDATE public.tables SET schema_perm = '[EcoSQL - demo (Conso Gaz 
Elec)].[demo].[public]'
   UPDATE public.tables SET catalog_perm = '[EcoSQL - demo (Conso Gaz 
Elec)].[demo]'
   UPDATE public.tables SET catalog = 'demo'
   
   UPDATE public.slices SET schema_perm = '[EcoSQL - demo (Conso Gaz 
Elec)].[demo].[public]'
   UPDATE public.slices SET catalog_perm = '[EcoSQL - demo (Conso Gaz 
Elec)].[demo]'
   
   This did allow me to retrieve the graph display.
   
   <img width="1219" height="587" alt="Image" 
src="https://github.com/user-attachments/assets/47f3b621-5efd-4e1e-9a85-2d5c8bae3a41";
 />
   
   The problem is not present with 6.0.0-RC4
   


-- 
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