feat(sqllab): Add a configuration option to disable data preview (#19104)

This commit is contained in:
cccs-Dustin
2022-03-17 09:22:57 -04:00
committed by GitHub
parent cfb967f430
commit 02ef9ca4cd
18 changed files with 175 additions and 42 deletions

View File

@@ -145,6 +145,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"extra",
"force_ctas_schema",
"id",
"disable_data_preview",
]
add_columns = [
"database_name",

View File

@@ -115,10 +115,12 @@ extra_description = markdown(
'["public", "csv_upload"]**. '
"If database flavor does not support schema or any schema is allowed "
"to be accessed, just leave the list empty<br/>"
"4. the ``version`` field is a string specifying the this db's version. "
"4. The ``version`` field is a string specifying the this db's version. "
"This should be used with Presto DBs so that the syntax is correct<br/>"
"5. The ``allows_virtual_table_explore`` field is a boolean specifying "
"whether or not the Explore button in SQL Lab results is shown.",
"whether or not the Explore button in SQL Lab results is shown.<br/>"
"6. The ``disable_data_preview`` field is a boolean specifying whether or not data "
"preview queries will be run when fetching table metadata in SQL Lab.",
True,
)
get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}