eschutho commented on pull request #19421:
URL: https://github.com/apache/superset/pull/19421#issuecomment-1086425617


   >Btw, I think the Dataset model may need a database_id column as well. There 
is the implicit assumption that a dataset can only run on one database. I 
cannot imagine a case where we need to support a virtual dataset being used on 
different tables in different databases. Having direct link to databases makes 
sure existing virtual datasets can be linked to the correct database without 
relying on an unreliable table name extraction process. Currently if table name 
extraction fails, a virtual dataset lost its association with a correct table, 
hence the only link to database. It would require joining SqlaTable with 
sqlatable_id to get the correct database id.
   
   I believe the having the db id on the table will be important for future 
features where we need to power a chart by a Table without a dataset, and I'm 
wary of having the db id in both places in case they become out of sync. I'm 
not sure if I follow the use case of a table name extraction failing and then 
the dataset doesn't have a relationship to a db. Doesn't a virtual dataset 
break if the table extraction doesn't work anyway? What would be the value of 
having a link to the db but not the table?


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to