You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/03 15:24:15 UTC

[GitHub] [superset] exemplary-citizen commented on a change in pull request #14449: feat: Add parquet upload

exemplary-citizen commented on a change in pull request #14449:
URL: https://github.com/apache/superset/pull/14449#discussion_r681865870



##########
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:
       I just opened https://github.com/apache/superset/issues/16046. Feel free to assign it to me. I'll try to open a PR for it sometime in the next week




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org