villebro commented on a change in pull request #14449:
URL: https://github.com/apache/superset/pull/14449#discussion_r682372284
##########
File path: superset/views/database/forms.py
##########
@@ -402,3 +417,130 @@ def at_least_one_schema_is_allowed(database: Database) ->
bool:
'Use [""] for empty string.'
),
)
+
+
+class ColumnarToDatabaseForm(DynamicForm):
+ # pylint: disable=E0211
+ def columnar_allowed_dbs() -> List[Database]: # type: ignore
+ # TODO: change allow_csv_upload to allow_file_upload
+ columnar_enabled_dbs = (
+ db.session.query(Database).filter_by(allow_csv_upload=True).all()
+ )
+ return [
+ columnar_enabled_db
+ for columnar_enabled_db in columnar_enabled_dbs
+ if ColumnarToDatabaseForm.at_least_one_schema_is_allowed(
+ columnar_enabled_db
+ )
+ ]
Review comment:
Thanks - I assigned to you (will keep myself as assignee for review)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]