mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat: Add parquet upload (#14449)
* allow csv upload to accept parquet file * fix mypy * fix if statement * add test for specificying columns in CSV upload * clean up test * change order in test * fix failures * upload parquet to seperate table in test * fix error message * fix mypy again * rename other extensions to columnar * add new form for columnar upload * add support for zip files * undo csv form changes except usecols * add more tests for zip * isort & black * pylint * fix trailing space * address more review comments * pylint * black * resolve remaining issues
This commit is contained in:
committed by
GitHub
parent
ad8336a5b4
commit
d25b0967a1
@@ -167,6 +167,7 @@ class SupersetAppInitializer:
|
||||
DashboardModelViewAsync,
|
||||
)
|
||||
from superset.views.database.views import (
|
||||
ColumnarToDatabaseView,
|
||||
CsvToDatabaseView,
|
||||
DatabaseView,
|
||||
ExcelToDatabaseView,
|
||||
@@ -281,6 +282,7 @@ class SupersetAppInitializer:
|
||||
appbuilder.add_view_no_menu(CssTemplateAsyncModelView)
|
||||
appbuilder.add_view_no_menu(CsvToDatabaseView)
|
||||
appbuilder.add_view_no_menu(ExcelToDatabaseView)
|
||||
appbuilder.add_view_no_menu(ColumnarToDatabaseView)
|
||||
appbuilder.add_view_no_menu(Dashboard)
|
||||
appbuilder.add_view_no_menu(DashboardModelViewAsync)
|
||||
appbuilder.add_view_no_menu(Datasource)
|
||||
@@ -371,7 +373,20 @@ class SupersetAppInitializer:
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
appbuilder.add_link(
|
||||
"Upload a Columnar file",
|
||||
label=__("Upload a Columnar file"),
|
||||
href="/columnartodatabaseview/form",
|
||||
icon="fa-upload",
|
||||
category="Data",
|
||||
category_label=__("Data"),
|
||||
category_icon="fa-wrench",
|
||||
cond=lambda: bool(
|
||||
self.config["COLUMNAR_EXTENSIONS"].intersection(
|
||||
self.config["ALLOWED_EXTENSIONS"]
|
||||
)
|
||||
),
|
||||
)
|
||||
try:
|
||||
import xlrd # pylint: disable=unused-import
|
||||
|
||||
|
||||
Reference in New Issue
Block a user