You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/02 00:16:12 UTC

[GitHub] [superset] eschutho edited a comment on pull request #19421: perf: migrate new dataset models with INSERT FROM

eschutho edited a comment 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.
   
   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-unsubscribe@superset.apache.org

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



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