mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
feat(sqllab): Add a configuration option to disable data preview (#19104)
This commit is contained in:
@@ -212,6 +212,13 @@ class Database(
|
||||
def explore_database_id(self) -> int:
|
||||
return self.get_extra().get("explore_database_id", self.id)
|
||||
|
||||
@property
|
||||
def disable_data_preview(self) -> bool:
|
||||
# this will prevent any 'trash value' strings from going through
|
||||
if self.get_extra().get("disable_data_preview", False) is not True:
|
||||
return False
|
||||
return True
|
||||
|
||||
@property
|
||||
def data(self) -> Dict[str, Any]:
|
||||
return {
|
||||
@@ -225,6 +232,7 @@ class Database(
|
||||
"allows_virtual_table_explore": self.allows_virtual_table_explore,
|
||||
"explore_database_id": self.explore_database_id,
|
||||
"parameters": self.parameters,
|
||||
"disable_data_preview": self.disable_data_preview,
|
||||
"parameters_schema": self.parameters_schema,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user