betodealmeida commented on a change in pull request #19425:
URL: https://github.com/apache/superset/pull/19425#discussion_r839873815



##########
File path: superset/datasets/models.py
##########
@@ -66,6 +67,15 @@ class Dataset(Model, AuditMixinNullable, ExtraJSONMixin, 
ImportExportMixin):
     # model has been deleted this column can be removed.
     sqlatable_id = sa.Column(sa.Integer, nullable=True, unique=True)
 
+    # default values set for filtering + querying if self.expression doesn't 
explicitly state
+    # which db or schema to read from
+    default_schema = sa.Column(sa.Text)
+    database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), 
nullable=False)
+    default_database: Database = relationship(
+        "Database",
+        foreign_keys=[database_id],

Review comment:
       @eschutho I talked with Hugh about this, we think we need the concept of 
a 'default database'. Right now there's an implicit assumption that all tables 
belong to the same database, but having a default database would allow us to 
relax that restriction in the future.
   
   It's similar with schema, tables can belong to different schemas today, but 
there's still a concept of a default schema which is needed if the query 
references only the table name.




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