mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(databases): GSheets and Clickhouse DBs are not allowed to upload files (#21065)
This commit is contained in:
committed by
GitHub
parent
82bd5a31b8
commit
b36bd3f083
@@ -129,6 +129,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
||||
"server_cert",
|
||||
"sqlalchemy_uri",
|
||||
"is_managed_externally",
|
||||
"engine_information",
|
||||
]
|
||||
list_columns = [
|
||||
"allow_file_upload",
|
||||
@@ -151,6 +152,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
||||
"force_ctas_schema",
|
||||
"id",
|
||||
"disable_data_preview",
|
||||
"engine_information",
|
||||
]
|
||||
add_columns = [
|
||||
"database_name",
|
||||
@@ -1062,6 +1064,13 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
||||
parameters:
|
||||
description: JSON schema defining the needed parameters
|
||||
type: object
|
||||
engine_information:
|
||||
description: Dict with public properties form the DB Engine
|
||||
type: object
|
||||
properties:
|
||||
supports_file_upload:
|
||||
description: Whether the engine supports file uploads
|
||||
type: boolean
|
||||
400:
|
||||
$ref: '#/components/responses/400'
|
||||
500:
|
||||
@@ -1078,6 +1087,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
||||
"engine": engine_spec.engine,
|
||||
"available_drivers": sorted(drivers),
|
||||
"preferred": engine_spec.engine_name in preferred_databases,
|
||||
"engine_information": engine_spec.get_public_information(),
|
||||
}
|
||||
|
||||
if engine_spec.default_driver:
|
||||
|
||||
Reference in New Issue
Block a user