chore(sqllab): Cleanup /tables/... endpoint (#21284)

This commit is contained in:
John Bodley
2022-09-13 08:22:12 -07:00
committed by GitHub
parent 59437ea6e7
commit eac6fdcd29
29 changed files with 116 additions and 468 deletions

View File

@@ -121,7 +121,6 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"allow_dml",
"backend",
"force_ctas_schema",
"allow_multi_schema_metadata_fetch",
"impersonate_user",
"masked_encrypted_extra",
"extra",
@@ -136,7 +135,6 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"allow_ctas",
"allow_cvas",
"allow_dml",
"allow_multi_schema_metadata_fetch",
"allow_run_async",
"allows_cost_estimate",
"allows_subquery",
@@ -167,7 +165,6 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"configuration_method",
"force_ctas_schema",
"impersonate_user",
"allow_multi_schema_metadata_fetch",
"extra",
"encrypted_extra",
"server_cert",

View File

@@ -67,11 +67,6 @@ allow_dml_description = (
"(UPDATE, DELETE, CREATE, ...) "
"in SQL Lab"
)
allow_multi_schema_metadata_fetch_description = (
"Allow SQL Lab to fetch a list of all tables and all views across "
"all database schemas. For large data warehouse with thousands of "
"tables, this can be expensive and put strain on the system."
) # pylint: disable=invalid-name
configuration_method_description = (
"Configuration_method is used on the frontend to "
"inform the backend whether to explode parameters "
@@ -368,9 +363,6 @@ class DatabasePostSchema(Schema, DatabaseParametersSchemaMixin):
allow_none=True,
validate=Length(0, 250),
)
allow_multi_schema_metadata_fetch = fields.Boolean(
description=allow_multi_schema_metadata_fetch_description,
)
impersonate_user = fields.Boolean(description=impersonate_user_description)
masked_encrypted_extra = fields.String(
description=encrypted_extra_description,
@@ -415,9 +407,6 @@ class DatabasePutSchema(Schema, DatabaseParametersSchemaMixin):
allow_none=True,
validate=Length(0, 250),
)
allow_multi_schema_metadata_fetch = fields.Boolean(
description=allow_multi_schema_metadata_fetch_description
)
impersonate_user = fields.Boolean(description=impersonate_user_description)
masked_encrypted_extra = fields.String(
description=encrypted_extra_description,
@@ -586,7 +575,7 @@ class DatabaseFunctionNamesResponse(Schema):
class ImportV1DatabaseExtraSchema(Schema):
# pylint: disable=no-self-use, unused-argument
@pre_load
def fix_schemas_allowed_for_csv_upload(
def fix_schemas_allowed_for_csv_upload( # pylint: disable=invalid-name
self, data: Dict[str, Any], **kwargs: Any
) -> Dict[str, Any]:
"""